docs: def build_vf_node(vf):
      """
      Convert a VulnerabilityFunction object into a Node suitable
      for XML conversion.
      """
      nodes = [Node('imls', {'imt': vf.imt}, vf.imls),
               Node('meanLRs', {}, vf.mean_loss_ratios),
               Node('covLRs', {}, vf.covs)]
      return Node(
          'vulnerabilityFunction',
          {'id': vf.id, 'dist': vf.distribution_name}, nodes=nodes)