code: def file_extension(path):
      
      if path is None:
          return None
      ext = os.path.splitext(os.path.basename(path))[1]
      if ext.startswith("."):
          ext = ext[1:]
      return ext
docs: Return the file extension.
  
      Examples: ::
  
          /foo/bar.baz => baz
          None         => None
  
      :param string path: the file path
      :rtype: string