class_docstr: Class that performs the reading of the csv_input and select the lines
  according to the subject id if available
class_docstr_tok: ["Class","that","performs","the","reading","of","the","csv_input","and","select","the","lines","according","to","the","subject","id","if","available"]
docstr: <<<<<<< HEAD
          Transform the dtaa to be of dimension 5d
  =======
          Transform the data to be of dimension 5d
  >>>>>>> 7a0386e78f01c88b707e08f759f910abba9b71b1
          :param data: data to expand
          :return: expanded data
          
docstr_tok: ["<","<","<","<","<","<","<","HEAD","Transform","the","dtaa","to","be","of","dimension","5d","=======","Transform","the","data","to","be","of","dimension","5d",">",">",">",">",">",">",">","7a0386e78f01c88b707e08f759f910abba9b71b1",":","param","data",":","data","to","expand",":","return",":","expanded","data"]
code: def apply_niftynet_format_to_data(data):
      """
      <<<<<<< HEAD
              Transform the dtaa to be of dimension 5d
      =======
              Transform the data to be of dimension 5d
      >>>>>>> 7a0386e78f01c88b707e08f759f910abba9b71b1
              :param data: data to expand
              :return: expanded data
      """
      if len(data.shape) == 1:
          data = np.expand_dims(data, 0)
      while len(data.shape) < 6:
          data = np.expand_dims(data, -1)
      return data
  
imports: import random
  import numpy
  import pandas
  import tensorflow
  from tensorflow.python.data.util import nest
  from niftynet.layer.base_layer import Layer
  from niftynet.io.image_reader import param_to_dict
label_desc: Use image node_id 11 for calling the CSVReader obj's underlying member method code with example usage: obj.apply_niftynet_format_to_data(data) and returns: data