code: def get_variables(self, entity = None):
          
          if not entity:
              return self.variables
          else:
              return {
                  variable_name: variable
                  for variable_name, variable in self.variables.items()
                  # TODO - because entities are copied (see constructor) they can't be compared
                  if variable.entity.key == entity.key
                  }
docs: Gets all variables contained in a tax and benefit system.
  
          :param <Entity subclass> entity: If set, returns only the variable defined for the given entity.
  
          :returns: A dictionnary, indexed by variable names.
          :rtype: dict