code: def node_to_nodal_planes(node):
      
      if not len(node):
          return None
      npd_pmf = []
      for plane in node.nodes:
          if not all(plane.attrib[key] for key in plane.attrib):
              # One plane fails - return None
              return None
          npd = NodalPlane(float(plane.attrib["strike"]),
                           float(plane.attrib["dip"]),
                           float(plane.attrib["rake"]))
          npd_pmf.append((float(plane.attrib["probability"]), npd))
      return PMF(npd_pmf)
docs: Parses the nodal plane distribution to a PMF