docs: def execute_func(env, need, func_string):
      """
      Executes a given function string.
      :param env: Sphinx environment
      :param need: Actual need, which contains the found function string
      :param func_string: string of the found function. Without [[ ]]
      :return: return value of executed function
      """
      func_name, func_args, func_kwargs = _analyze_func_string(func_string)
  
      if func_name not in env.needs_functions.keys():
          raise SphinxError('Unknown dynamic sphinx-needs function: {}. Found in need: {}'.format(func_name, need['id']))
  
      func = env.needs_functions[func_name]['function']
      func_return = func(env, need, env.needs_all_needs, *func_args, **func_kwargs)
  
      if not isinstance(func_return, (str, int, float, list, unicode)) and func_return is not None:
          raise SphinxError('Return value of function {} is of type {}. Allowed are str, int, float'.format(
              func_name, type(func_return)))
  
      if isinstance(func_return, list):
          for element in func_return:
              if not isinstance(element, (str, int, float, unicode)):
                  raise SphinxError('Element of return list of function {} is of type {}. '
                                    'Allowed are str, int, float'.format(func_name, type(func_return)))
      return func_return