code: def to_function(var_instance, lineno=None):
          
          assert isinstance(var_instance, SymbolVAR)
          from symbols import FUNCTION
          var_instance.__class__ = FUNCTION
          var_instance.class_ = CLASS.function
          var_instance.reset(lineno=lineno)
          return var_instance
docs: Converts a var_instance to a function one