code: def _expander(namepath):
      
      if "~" in namepath:
          namepath = os.path.expanduser(namepath)
      else:
          namepath = os.path.abspath(namepath)
      return namepath
docs: expand ./ ~ and ../ designators in location names