class_docstr: This class maintains a pandas.dataframe of filenames for all input sections.
  The list of filenames are obtained by searching the specified folders
  or loading from an existing csv file.
  
  Users can query a subset of the dataframe by train/valid/infer partition
  label and input section names.
docstr: get file names as a dataframe, by partitioning phase and section names
  set phase to ALL to load all subsets.
  
  :param phase: the label of the subset generated by self._partition_ids
              should be one of the SUPPORTED_PHASES
  :param section_names: one or multiple input section names
  :return: a pandas.dataframe of file names
docstr_tok: ["get","file","names","as","a","dataframe",",","by","partitioning","phase","and","section","names","set","phase","to","ALL","to","load","all","subsets",".",":","param","phase",":","the","label","of","the","subset","generated","by","self._partition_ids","should","be","one","of","the","SUPPORTED_PHASES",":","param","section_names",":","one","or","multiple","input","section","names",":","return",":","a","pandas.dataframe","of","file","names"]
code: def get_file_list(self, phase=ALL, *section_names):
      """
      get file names as a dataframe, by partitioning phase and section names
      set phase to ALL to load all subsets.
  
      :param phase: the label of the subset generated by self._partition_ids
                  should be one of the SUPPORTED_PHASES
      :param section_names: one or multiple input section names
      :return: a pandas.dataframe of file names
      """
      if self._file_list is None:
          tf.logging.warning(
              "Empty file list, please initialise"
              "ImageSetsPartitioner first."
          )
          return []
      try:
          phase = look_up_operations(phase.lower(), SUPPORTED_PHASES)
      except (ValueError, AttributeError):
          tf.logging.fatal("Unknown phase argument.")
          raise
  
      for name in section_names:
          try:
              look_up_operations(name, set(self._file_list))
          except ValueError:
              tf.logging.fatal(
                  "Requesting files under input section [%s],\n"
                  "however the section does not exist in the config.",
                  name,
              )
              raise
      if phase == ALL:
          self._file_list = self._file_list.sort_values(COLUMN_UNIQ_ID)
          if section_names:
              section_names = [COLUMN_UNIQ_ID] + list(section_names)
              return self._file_list[section_names]
          return self._file_list
      if self._partition_ids is None or self._partition_ids.empty:
          tf.logging.fatal("No partition ids available.")
          if self.new_partition:
              tf.logging.fatal(
                  "Unable to create new partitions,"
                  "splitting ratios: %s, writing file %s",
                  self.ratios,
                  self.data_split_file,
              )
          elif os.path.isfile(self.data_split_file):
              tf.logging.fatal(
                  "Unable to load %s, initialise the"
                  "ImageSetsPartitioner with `new_partition=True`"
                  "to overwrite the file.",
                  self.data_split_file,
              )
          raise ValueError
  
      selector = self._partition_ids[COLUMN_PHASE] == phase
      selected = self._partition_ids[selector][[COLUMN_UNIQ_ID]]
      if selected.empty:
          tf.logging.warning(
              "Empty subset for phase [%s], returning None as file list. "
              "Please adjust splitting fractions.",
              phase,
          )
          return None
      subset = pandas.merge(
          self._file_list, selected, on=COLUMN_UNIQ_ID, sort=True
      )
      if subset.empty:
          tf.logging.warning(
              "No subject id matched in between file names and "
              "partition files.\nPlease check the partition files %s,\nor "
              "removing it to generate a new file automatically.",
              self.data_split_file,
          )
      if section_names:
          section_names = [COLUMN_UNIQ_ID] + list(section_names)
          return subset[section_names]
      return subset
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import os
  import random
  import shutil
  import pandas
  import tensorflow
  from niftynet.engine.signal import TRAIN, VALID, INFER, ALL
  from niftynet.utilities.decorators import singleton
  from niftynet.utilities.filename_matching import KeywordsMatching
  from niftynet.utilities.niftynet_global_config import NiftyNetGlobalConfig
  from niftynet.utilities.util_common import look_up_operations
  from niftynet.utilities.util_csv import match_and_write_filenames_to_csv
  from niftynet.utilities.util_csv import write_csv
label_desc: Use image node_id 3 for calling the ImageSetsPartitioner obj's underlying member method code with example usage: obj.get_file_list(phase) and returns: subset, list, self, None, subset, self