code: def _valid_name(path: _Path) -> bool:
      # Ignore invalid names that cannot be imported directly
      return os.path.basename(path).isidentifier()
  
imports: import itertools
  import os
  from fnmatch import fnmatchcase
  from glob import glob
  from pathlib import Path
  from typing import TYPE_CHECKING, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, Union
  import _distutils_hack.override
  from distutils import log
  from distutils.util import convert_path
label_desc: Use image node_id 1 for calling a global function with example usage: _valid_name(path) and returns: os