class_docstr: This class is responsible for loading tests according to various criteria
  and returning them wrapped in a TestSuite
class_docstr_tok: ["This","class","is","responsible","for","loading","tests","according","to","various","criteria","and","returning","them","wrapped","in","a","TestSuite"]
code: def _get_name_from_path(self, path):
      if path == self._top_level_dir:
          return "."
      path = _splitext(os.path.normpath(path))
  
      _relpath = os.path.relpath(path, self._top_level_dir)
      assert not os.path.isabs(
          _relpath
      ), "Path must be within the project"
      assert not _relpath.startswith(
          ".."
      ), "Path must be within the project"
  
      name = _relpath.replace(os.path.sep, ".")
      return name
  
imports: import os
  import re
  import sys
  import traceback
  import types
  import functools
  from fnmatch import fnmatch, fnmatchcase
  from .None import case, suite, util
label_desc: Use image node_id 9 for calling the TestLoader obj's underlying member method code with example usage: obj._get_name_from_path(path) and returns: name, str