code: def get_mod_name(path, base):
      """Gets a module name, given the path of file/dir and base
      dir of sympy"""
  
      rel_path = os.path.relpath(path, base)
  
      # Remove the file extension
      rel_path, ign = os.path.splitext(rel_path)
  
      # Replace separators by . for module path
      file_module = ""
      h, t = os.path.split(rel_path)
      while h or t:
          if t:
              file_module = t + "." + file_module
          h, t = os.path.split(h)
  
      return file_module[:-1]
  
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 5 for calling a global function with example usage: get_mod_name(path, base) and returns: file_module