code: def cmpname(name1, name2):
      
      if name1 is None and name2 is None:
          return 0
      if name1 is None:
          return -1
      if name2 is None:
          return 1
      lower_name1 = name1.lower()
      lower_name2 = name2.lower()
      if lower_name1 == lower_name2:
          return 0
      return -1 if lower_name1 < lower_name2 else 1
docs: Compare two CIM names for equality and ordering.
  
      The comparison is performed case-insensitively.
  
      One or both of the items may be `None`, and `None` is considered the lowest
      possible value.
  
      The implementation delegates to the '==' and '<' operators of the
      name datatypes.
  
      If name1 == name2, 0 is returned.
      If name1 < name2, -1 is returned.
      Otherwise, +1 is returned.