code: def _createGsshaPyObjects(self, mapTables, indexMaps, replaceParamFile, directory, session, spatial, spatialReferenceID):
          for mt in mapTables:
              try:
                  if mt['indexMapName'] is not None:
                      indexMaps[mt['indexMapName']]
                  mapTable = MapTable(name=mt['name'],
                                      numIDs=mt['numVars']['NUM_IDS'],
                                      maxNumCells=mt['numVars']['MAX_NUMBER_CELLS'],
                                      numSed=mt['numVars'].get('NUM_SED'),
                                      numContam=mt['numVars'].get('NUM_CONTAM'),
                                      maxSoilID=mt['numVars'].get('MAX_SOIL_ID'))
                  mapTable.mapTableFile = self
                  if mt['indexMapName']:
                      mapTable.indexMap = indexMaps[mt['indexMapName']]
                  if mt['name'] == 'CONTAMINANT_TRANSPORT':
                      for contam in mt['contaminants']:
                          outputBaseFilename = self._preprocessContaminantOutFilePath(contam['outPath'])
                          contaminant = MTContaminant(name=contam['name'],
                                                      outputFilename=outputBaseFilename,
                                                      precipConc=vrp(contam['contamVars']['PRECIP_CONC'], replaceParamFile),
                                                      partition=vrp(contam['contamVars']['PARTITION'], replaceParamFile),
                                                      numIDs=contam['contamVars']['NUM_IDS'])
                          indexMap = indexMaps[contam['indexMapName']]
                          contaminant.indexMap = indexMap
                          self._createValueObjects(contam['valueList'], contam['varList'], mapTable, indexMap,
                                                   contaminant, replaceParamFile)
                          self._readContaminantOutputFiles(directory, outputBaseFilename, session, spatial, spatialReferenceID)
                  elif mt['name'] == 'SEDIMENTS':
                      for line in mt['valueList']:
                          sediment = MTSediment(description=line[0],
                                                specificGravity=vrp(line[1], replaceParamFile),
                                                particleDiameter=vrp(line[2], replaceParamFile),
                                                outputFilename=line[3])
                          sediment.mapTable = mapTable
                  else:
                      indexMap = indexMaps[mt['indexMapName']]
                      self._createValueObjects(mt['valueList'], mt['varList'], mapTable, indexMap, None, replaceParamFile)
              except KeyError:
                  log.info(('Index Map "%s" for Mapping Table "%s" not found in list of index maps in the mapping '
                            'table file. The Mapping Table was not read into the database.') % (
                            mt['indexMapName'], mt['name']))