code: def normalize(rp_pyxb):
      def sort(r, a):
          d1_common.xml.sort_value_list_pyxb(_get_attr_or_list(r, a))
      rp_pyxb.preferredMemberNode = set(_get_attr_or_list(rp_pyxb, 'pref')) - set(
          _get_attr_or_list(rp_pyxb, 'block')
      )
      sort(rp_pyxb, 'block')
      sort(rp_pyxb, 'pref')