code: def process_function(
      name,
      c_name,
      b_obj,
      mod_path,
      f_skip,
      f_missing_doc,
      f_missing_doctest,
      f_indirect_doctest,
      f_has_doctest,
      skip_list,
      sph,
      sphinx=True,
  ):
      """
      Processes a function to get information regarding documentation.
      It is assume that the function calling this subrouting has already
      verified that it is a valid module function.
      """
      if name in skip_list:
          return False, False
  
      # We add in the end, as inspect.getsourcelines is slow
      add_missing_doc = False
      add_missing_doctest = False
      add_indirect_doctest = False
      in_sphinx = True
      f_doctest = False
      function = False
  
      if inspect.isclass(b_obj):
          obj = getattr(b_obj, name)
          obj_name = c_name + "." + name
      else:
          obj = b_obj
          obj_name = name
  
      full_name = _get_arg_list(name, obj)
  
      if name.startswith("_"):
          f_skip.append(full_name)
      else:
          doc = obj.__doc__
          if isinstance(doc, str):
              if not doc:
                  add_missing_doc = True
              elif not ">>>" in doc:
                  add_missing_doctest = True
              elif _is_indirect(name, doc):
                  add_indirect_doctest = True
              else:
                  f_doctest = True
          elif doc is None:
              # this was a function defined in the docstring
              f_doctest = True
          else:
              raise TypeError(
                  "Current doc type for ",
                  print(obj),
                  " is ",
                  type(doc),
                  ". Docstring must be a string, property, or none",
              )
  
          function = True
  
          if sphinx:
              in_sphinx = find_sphinx(obj_name, mod_path)
  
      if (
          add_missing_doc
          or add_missing_doctest
          or add_indirect_doctest
          or not in_sphinx
      ):
          try:
              line_no = inspect.getsourcelines(obj)[1]
          except IOError:
              # Raised when source does not exist
              # which means the function is not there.
              return False, False
  
          full_name = "LINE %d: %s" % (line_no, full_name)
          if add_missing_doc:
              f_missing_doc.append(full_name)
          elif add_missing_doctest:
              f_missing_doctest.append(full_name)
          elif add_indirect_doctest:
              f_indirect_doctest.append(full_name)
          if not in_sphinx:
              sph.append(full_name)
  
      return f_doctest, function
  
file_path: sympy/bin/coverage_doctest.py
imports: from __future__ import print_function
  import os
  import sys
  import inspect
  from argparse import ArgumentParser, RawDescriptionHelpFormatter
  from sympy.utilities.misc import filldedent
label_desc: Use image node_id 7 for calling a global function with example usage: process_function(name, c_name, b_obj, mod_path, f_skip, f_missing_doc, f_missing_doctest, f_indirect_doctest, f_has_doctest, skip_list, sph, sphinx) and returns: f_doctest,  function, False,  False, False,  False