Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Attributes
----------
args : dict
A json representation of an event assignment.
species : list
List of GillesPy2 species.
parameter : list
List of GillesPy2 parameters.
'''
expression = args['expression']
variable = list(filter(lambda s: s.name == args['variable']['name'], species))
if not len(variable):
variable = list(filter(lambda p: p.name == args['variable']['name'], parameters))
return EventAssignment(variable=variable[0], expression=expression)