def unpack_task_input(task):
 task_input = task.task_input
 for key in ['import_from', 'import_from_format', 'image_properties']:
  if (key not in task_input):
   msg = (_("Input does not contain '%(key)s' field") % {'key': key})
   raise exception.Invalid(msg)
 return task_input

def unpack_task_input ( task ) : task_input = task . task_input for key in [ 'import_from' , 'import_from_format' , 'image_properties' ] : if ( key not in task_input ) : msg = ( _ ( "Input does not contain '%(key)s' field" ) % { 'key' : key } ) raise exception . Invalid ( msg ) return task_input
verifies and returns valid task input dictionary .