code: def listdir(fp):
      """Lists the datasets in a directory or archive file.
  
      Archive files must be prefixed like "zip://" or "tar://".
  
      Parameters
      ----------
      fp : str or pathlib.Path
          Directory or archive path.
  
      Returns
      -------
      list of str
          A list of datasets.
  
      Raises
      ------
      TypeError
          If the input is not a str or Path.
  
      """
      if isinstance(fp, Path):
          fp = str(fp)
  
      if not isinstance(fp, str):
          raise TypeError("invalid path: %r" % fp)
  
      pobj = parse_path(fp)
      return _listdir(vsi_path(pobj))
  
imports: import glob
  import logging
  import os
  from pathlib import Path
  import platform
  import warnings
  from fiona._env import calc_gdal_version_num, get_gdal_release_name, get_gdal_version_num, get_gdal_version_tuple
  from fiona._env import driver_count
  from fiona._show_versions import show_versions
  from fiona.collection import BytesCollection, Collection
  from fiona.drvsupport import supported_drivers
  from fiona.env import ensure_env_with_credentials, Env
  from fiona.errors import FionaDeprecationWarning
  from fiona.io import MemoryFile
  from fiona.model import Feature, Geometry, Properties
  from fiona.ogrext import FIELD_TYPES_MAP, _bounds, _listdir, _listlayers, _remove, _remove_layer
  from fiona.path import ParsedPath, parse_path, vsi_path
  from fiona.vfs import parse_paths
  from fiona import _geometry, _err, rfc3339
  import uuid
label_desc: Use image node_id 3 for calling a global function with example usage: listdir(fp) and returns: _listdir