docs: def get_fragility_model(node, fname):
      """
      :param node:
          a vulnerabilityModel node
      :param fname:
          path to the vulnerability file
      :returns:
          a dictionary imt, ff_id -> fragility function list
      """
      with context(fname, node):
          fid = node['id']
          asset_category = node['assetCategory']
          loss_type = node['lossCategory']
          description = ~node.description
          limit_states = ~node.limitStates
          ffs = node[2:]
      fmodel = scientific.FragilityModel(
          fid, asset_category, loss_type, description, limit_states)
      for ff in ffs:
          array, attrs = ffconvert(fname, limit_states, ff)
          attrs['id'] = ff['id']
          ffl = scientific.FragilityFunctionList(array, **attrs)
          fmodel[ff.imls['imt'], ff['id']] = ffl
      return fmodel