code: def node_to_truncated_gr(node, bin_width=0.1):
      
      # Parse to float dictionary
      if not all([node.attrib[key]
                  for key in ["minMag", "maxMag", "aValue", "bValue"]]):
          return None
      tgr = dict((key, float_(node.attrib[key])) for key in node.attrib)
      return mfd.truncated_gr.TruncatedGRMFD(min_mag=tgr["minMag"],
                                             max_mag=tgr["maxMag"],
                                             bin_width=bin_width,
                                             a_val=tgr["aValue"],
                                             b_val=tgr["bValue"])
docs: Parses truncated GR node to an instance of the
      :class: openquake.hazardlib.mfd.truncated_gr.TruncatedGRMFD