code: def find_vasprun_files():
      
      folders = glob.glob('split-*')
      folders = sorted(folders) if folders else ['.']
  
      filenames = []
      for fol in folders:
          vr_file = os.path.join(fol, 'vasprun.xml')
          vr_file_gz = os.path.join(fol, 'vasprun.xml.gz')
  
          if os.path.exists(vr_file):
              filenames.append(vr_file)
          elif os.path.exists(vr_file_gz):
              filenames.append(vr_file_gz)
          else:
              logging.error('ERROR: No vasprun.xml found in {}!'.format(fol))
              sys.exit()
  
      return filenames
docs: Search for vasprun files from the current directory.
  
      The precedence order for file locations is:
  
        1. First search for folders named: 'split-0*'
        2. Else, look in the current directory.
  
      The split folder names should always be zero based, therefore easily
      sortable.