code: def extract_path_ext(path, default_ext=None):
      
      ext = None
      _, dotext = os.path.splitext(path)
      if dotext:
          ext = dotext[1:]
      if not ext and default_ext:
          ext = default_ext
      if not ext:
          raise ValueError('No extension in path {} and default_ext is None'.format(path))
      return ext
docs: Extract file extension (without dot) from `path` or return `default_ext` if
      path does not contain a valid extension.