parameters: (path)
return_statement: return path
docstring: Gives the display value for a given path, making it relative to cwd
      if possible.
docstring_summary: Gives the display value for a given path, making it relative to cwd
      if possible.
docstring_tokens: Gives the display value for a given path making it relative to cwd if possible .
function: def display_path(path):
      # type: (Union[str, Text]) -> str
      """Gives the display value for a given path, making it relative to cwd
      if possible."""
      path = os.path.normcase(os.path.abspath(path))
      if sys.version_info[0] == 2:
          path = path.decode(sys.getfilesystemencoding(), 'replace')
          path = path.encode(sys.getdefaultencoding(), 'replace')
      if path.startswith(os.getcwd() + os.path.sep):
          path = '.' + path[len(os.getcwd()):]
      return path
function_tokens: def display_path ( path ) : # type: (Union[str, Text]) -> str path = os . path . normcase ( os . path . abspath ( path ) ) if sys . version_info [ 0 ] == 2 : path = path . decode ( sys . getfilesystemencoding ( ) , 'replace' ) path = path . encode ( sys . getdefaultencoding ( ) , 'replace' ) if path . startswith ( os . getcwd ( ) + os . path . sep ) : path = '.' + path [ len ( os . getcwd ( ) ) : ] return path