docs: def register_func(env, need_function):
      """
      Registers a new sphinx-needs function for the given sphinx environment.
      :param env: Sphinx environment
      :param need_function: Python method
      :return: None
      """
  
      if not hasattr(env, 'needs_functions'):
          env.needs_functions = {}
  
      func_name = need_function.__name__
  
      if func_name in env.needs_functions.keys():
          raise SphinxError('sphinx-needs: Function name {} already registered.'.format(func_name))
  
      env.needs_functions[func_name] = {
          'name': func_name,
          'function': need_function
      }