def get_optional_parameters(dictionary):
 return {key: dictionary[key] for key in OPTIONAL_PARAMETERS if (key in dictionary)}

def get_optional_parameters ( dictionary ) : return { key : dictionary [ key ] for key in OPTIONAL_PARAMETERS if ( key in dictionary ) }
extract all optional lti parameters from a dictionary .