code: def _setup_table_from_str(self, table, sa_damping):
          
          table = table.strip().splitlines()
          header = table.pop(0).split()
          if not header[0].upper() == "IMT":
              raise ValueError('first column in a table must be IMT')
          coeff_names = header[1:]
          for row in table:
              row = row.split()
              imt_name = row[0].upper()
              if imt_name == 'SA':
                  raise ValueError('specify period as float value '
                                   'to declare SA IMT')
              imt_coeffs = dict(zip(coeff_names, map(float, row[1:])))
              try:
                  sa_period = float(imt_name)
              except Exception:
                  if imt_name not in imt_module.registry:
                      raise ValueError('unknown IMT %r' % imt_name)
                  imt = imt_module.registry[imt_name]()
                  self.non_sa_coeffs[imt] = imt_coeffs
              else:
                  if sa_damping is None:
                      raise TypeError('attribute "sa_damping" is required '
                                      'for tables defining SA')
                  imt = imt_module.SA(sa_period, sa_damping)
                  self.sa_coeffs[imt] = imt_coeffs
docs: Builds the input tables from a string definition