docstr: perform any desired path post-processing (e.g., dereferencing etc)
  
  By default - realpath to guarantee reuse. Derived classes (e.g.,
  Dataset) could override to allow for symlinked datasets to have
  individual instances for multiple symlinks
docstr_tok: ["perform","any","desired","path","post-processing","(","e.g.",",","dereferencing","etc",")","By","default","-","realpath","to","guarantee","reuse",".","Derived","classes","(","e.g.",",","Dataset",")","could","override","to","allow","for","symlinked","datasets","to","have","individual","instances","for","multiple","symlinks"]
code: def _flyweight_postproc_path(cls, path):
      """perform any desired path post-processing (e.g., dereferencing etc)
  
      By default - realpath to guarantee reuse. Derived classes (e.g.,
      Dataset) could override to allow for symlinked datasets to have
      individual instances for multiple symlinks
      """
      # resolve symlinks to make sure we have exactly one instance per
      # physical repository at a time
      # do absolute() in addition to always get an absolute path
      # even with non-existing paths on windows
      resolved = str(ut.Path(path).resolve().absolute())
      if ut.on_windows and resolved.startswith("\\\\"):
          # resolve() ended up converting a mounted network drive into a UNC path.
          # such paths are not supoprted (e.g. as cmd.exe CWD), hence redo and take
          # absolute path at face value. This has the consequence we cannot determine
          # repo duplicates mounted on different drives, but this is no worse than
          # on UNIX
          return str(ut.Path(path).absolute())
      return resolved
  
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 2 for calling the PathBasedFlyweight obj's underlying member method code with example usage: obj._flyweight_postproc_path(cls, path) and returns: resolved, str