code: def path_to_glob(path):
      
      from string import Formatter
  
      fmt = Formatter()
  
      if not isinstance(path, str):
          return path
  
      # Get just the real bits of the urlpath
      literal_texts = [i[0] for i in fmt.parse(path)]
  
      # Only use a star for first empty string in literal_texts
      index_of_empty = [i for i, lt in enumerate(literal_texts) if lt == '' and i != 0]
      glob = '*'.join([literal_texts[i] for i in range(len(literal_texts)) if i not in index_of_empty])
  
      return glob
docs: Convert pattern style paths to glob style paths
  
      Returns path if path is not str
  
      Parameters
      ----------
      path : str
          Path to data optionally containing format_strings
  
      Returns
      -------
      glob : str
          Path with any format strings replaced with *
  
      Examples
      --------
  
      >>> path_to_glob('{year}/{month}/{day}.csv')
      '*/*/*.csv'
      >>> path_to_glob('data/{year:4}{month:02}{day:02}.csv')
      'data/*.csv'
      >>> path_to_glob('data/*.csv')
      'data/*.csv'