def get_required_parameters(dictionary, additional_params=None):
 params = {}
 additional_params = (additional_params or [])
 for key in (REQUIRED_PARAMETERS + additional_params):
  if (key not in dictionary):
   return None
  params[key] = dictionary[key]
 return params

def get_required_parameters ( dictionary , additional_params = None ) : params = { } additional_params = ( additional_params or [ ] ) for key in ( REQUIRED_PARAMETERS + additional_params ) : if ( key not in dictionary ) : return None params [ key ] = dictionary [ key ] return params
extract all required lti parameters from a dictionary and verify that none are missing .