code: def build_instance_name(inst, obj=None):
      
      if obj is None:
          for _ in inst.properties.values():
              inst.path.keybindings.__setitem__(_.name, _.value)
          return inst.path
      if not isinstance(obj, list):
          return build_instance_name(inst, get_keys_from_class(obj))
      keys = {}
      for _ in obj:
          if _ not in inst.properties:
              raise pywbem.CIMError(pywbem.CIM_ERR_FAILED,
                                    "Instance of %s is missing key property %s" \
                                    %(inst.classname, _))
          keys[_] = inst[_]
      inst.path = pywbem.CIMInstanceName(classname=inst.classname,
                                         keybindings=keys,
                                         namespace=inst.path.namespace,
                                         host=inst.path.host)
      return inst.path
docs: Return an instance name from an instance, and set instance.path