code: def convert_path_to_module_parts(path):
      """Convert path to a python file into list of module names."""
      module_parts = list(path.parts)
      if module_parts[-1] in ["__init__.py", "__init__.pyc"]:
          # remove trailing __init__.py
          module_parts = module_parts[:-1]
      else:
          # remove file extension
          module_parts[-1], _ = os.path.splitext(module_parts[-1])
      return module_parts
  
imports: import functools
  import hashlib
  import os.path
  import re
  import sys
  from pathlib import Path
  import pkg_resources
  import sacred.optional
  from sacred import SETTINGS
  from sacred.utils import iter_prefixes
label_desc: Use image node_id 4 for calling a global function with example usage: convert_path_to_module_parts(path) and returns: module_parts