code: def _flyweight_id_from_args(cls, *args, **kwargs):
      if args:
          # to a certain degree we need to simulate an actual call to __init__
          # and make sure, passed arguments are fitting:
          # TODO: Figure out, whether there is a cleaner way to do this in a
          # generic fashion
          assert "path" not in kwargs
          path = args[0]
          args = args[1:]
      elif "path" in kwargs:
          path = kwargs.pop("path")
      else:
          raise TypeError("__init__() requires argument `path`")
  
      if path is None:
          lgr.debug("path is None. args: %s, kwargs: %s", args, kwargs)
          raise ValueError("path must not be None")
  
      # Custom handling for few special abbreviations if defined by the class
      path_ = cls._flyweight_preproc_path(path)
  
      # Sanity check for argument `path`:
      # raise if we cannot deal with `path` at all or
      # if it is not a local thing:
      localpath = RI(path_).localpath
  
      path_postproc = cls._flyweight_postproc_path(localpath)
  
      kwargs["path"] = path_postproc
      return path_postproc, args, kwargs
  
file_path: datalad/datalad/dataset/repo.py
imports: import logging
  import threading
  from datalad.support.exceptions import InvalidInstanceRequestError
  from datalad.support.network import RI
  from datalad import utils
label_desc: Use image node_id 3 for calling the PathBasedFlyweight obj's underlying member method code with example usage: obj._flyweight_id_from_args(cls) and returns: path_postproc,  args,  kwargs