code: def get_function(function_name, composite_function_expression=None):
      
  
      # Check whether this is a composite function or a simple function
      if composite_function_expression is not None:
  
          # Composite function
  
          return _parse_function_expression(composite_function_expression)
  
      else:
  
          if function_name in _known_functions:
  
              return _known_functions[function_name]()
  
          else:
  
              # Maybe this is a template
  
              # NOTE: import here to avoid circular import
  
              from astromodels.functions.template_model import TemplateModel, MissingDataFile
  
              try:
  
                  instance = TemplateModel(function_name)
  
              except MissingDataFile:
  
                  raise UnknownFunction("Function %s is not known. Known functions are: %s" %
                                        (function_name, ",".join(_known_functions.keys())))
  
              else:
  
                  return instance
docs: Returns the function "name", which must be among the known functions or a composite function.
  
      :param function_name: the name of the function (use 'composite' if the function is a composite function)
      :param composite_function_expression: composite function specification such as
      ((((powerlaw{1} + (sin{2} * 3)) + (sin{2} * 25)) - (powerlaw{1} * 16)) + (sin{2} ** 3.0))
      :return: the an instance of the requested class