<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_files(input_file):
 """ Initializes an index of files to generate, returns the base directory and index. """

  file_index = {}
  base_dir = None
  if os.path.isfile(input_file):
    file_index[input_file] = None
    base_dir = os.path.dirname(input_file)
  elif os.path.isdir(input_file):
    base_dir = input_file
    for inf in glob.glob(input_file + s.SBP_EXTENSION):
      file_index[os.path.abspath(inf)] = None
    for inf in glob.glob(input_file + '/*'):
      base, index = get_files(os.path.abspath(inf))
      z = file_index.copy()
      z.update(index)
      file_index = z
  return (base_dir, file_index)