code: def vars_as_functions(self):
          
          vars2functions = {}
          key = lambda arg: [isinstance(arg, Parameter), str(arg)]
          # Iterate over all symbols in this model in topological order, turning
          # each one into a function object recursively.
          for symbol in self.ordered_symbols:
              if symbol in self.connectivity_mapping:
                  dependencies = self.connectivity_mapping[symbol]
                  # Replace the dependency by it's function if possible
                  dependencies = [vars2functions.get(dependency, dependency)
                                 for dependency in dependencies]
                  # sort by vars first, then params, and alphabetically within
                  # each group
                  dependencies = sorted(dependencies, key=key)
                  vars2functions[symbol] = sympy.Function(symbol.name)(*dependencies)
          return vars2functions
docs: :return: Turn the keys of this model into
              :class:`~sympy.core.function.Function`
              objects. This is done recursively so the chain rule can be applied
              correctly. This is done on the basis of `connectivity_mapping`.
  
              Example: for ``{y: a * x, z: y**2 + a}`` this returns
              ``{y: y(x, a), z: z(y(x, a), a)}``.