original_docstring: 
          Make sure the data dirs exist and resolve the test and train dirs
          abspaths
          
docstring: Make sure the data dirs exist and resolve the test and train dirs
  abspaths
docstring_tokens: Make sure the data dirs exist and resolve the test and train dirs abspaths
code: def check_data_dir(self, data_dir_possibilities):
          """
          Make sure the data dirs exist and resolve the test and train dirs
          abspaths
          """
          for possible_dir in data_dir_possibilities:
              # expand out any environment variables in paths
              possible_dir = os.path.expandvars(possible_dir)
              train_data_dir = os.path.join(possible_dir, 'train')
              test_data_dir = os.path.join(possible_dir, 'test')
              dirs_exist = os.path.exists(train_data_dir) and \
                                                  os.path.exists(test_data_dir)
  
              if dirs_exist:
                  return os.path.abspath(possible_dir)
          raise ValueError("Can't find data dir in options: {0}".format(\
                                                              data_dir_possibilities))
code_tokens: def check_data_dir ( self , data_dir_possibilities ) : for possible_dir in data_dir_possibilities : possible_dir = os . path . expandvars ( possible_dir ) train_data_dir = os . path . join ( possible_dir , 'train' ) test_data_dir = os . path . join ( possible_dir , 'test' ) dirs_exist = os . path . exists ( train_data_dir ) and os . path . exists ( test_data_dir ) if dirs_exist : return os . path . abspath ( possible_dir ) raise ValueError ( "Can't find data dir in options: {0}" . format ( data_dir_possibilities ) )
short_docstring: Make sure the data dirs exist and resolve the test and train dirs
  abspaths
short_docstring_tokens: Make sure the data dirs exist and resolve the test and train dirs abspaths
comment: """
          Make sure the data dirs exist and resolve the test and train dirs
          abspaths
          """$SEP$# expand out any environment variables in paths