code: def ls(
      path: str,
      detail: bool = False,
  ) -> Union[List[str], List[Dict[str, Any]]]:
      fs = get_fs(path)
      outputs = fs.ls(path, detail=detail)
  
      if not isdisk(path):
          if detail:
              for output in outputs:
                  output["name"] = fs.unstrip_protocol(output["name"])
          else:
              outputs = [
                  fs.unstrip_protocol(output) for output in outputs
              ]
  
      return outputs
  
imports: import io
  import os.path
  import sys
  from typing import Any, Dict, List, Literal, Optional, Union, overload
  from uuid import uuid4
  import fsspec
  import torch
  import torch_geometric
label_desc: Use image node_id 11 for calling a global function with example usage: ls(path, detail) and returns: outputs