code: def gsim_imt_dt(sorted_gsims, sorted_imts):
      
      dtlist = [(imt, numpy.float32) for imt in sorted_imts]
      imt_dt = numpy.dtype(dtlist)
      return numpy.dtype([(str(gsim), imt_dt) for gsim in sorted_gsims])
docs: Build a numpy dtype as a nested record with keys 'idx' and nested
      (gsim, imt).
  
      :param sorted_gsims: a list of GSIM instances, sorted lexicographically
      :param sorted_imts: a list of intensity measure type strings