def preprocess_vars(a):
 if (a is None):
  return None
 elif (not isinstance(a, list)):
  data = [a]
 else:
  data = a
 for item in data:
  if (not isinstance(item, MutableMapping)):
   raise AnsibleError(('variable files must contain either a dictionary of variables, or a list of dictionaries. Got: %s (%s)' % (a, type(a))))
 return data

def preprocess_vars ( a ) : if ( a is None ) : return None elif ( not isinstance ( a , list ) ) : data = [ a ] else : data = a for item in data : if ( not isinstance ( item , MutableMapping ) ) : raise AnsibleError ( ( 'variable files must contain either a dictionary of variables, or a list of dictionaries. Got: %s (%s)' % ( a , type ( a ) ) ) ) return data
ensures that vars contained in the parameter passed in are returned as a list of dictionaries .