def METHOD_NAME(self, obj, name):
    """
    Create an alias for an object.  An aliases are symbols that
    do not have a one-to-one correspondence with objects.
    """
    if name in self.aliases:
        #
        # If the alias exists and the objects are the same,
        # then return.  Otherwise, raise an exception.
        #
        old_object = self.aliases[name]
        if old_object is obj:
            return
        else:
            raise RuntimeError(
                "Duplicate alias '%s' already associated with "
                "component '%s' (conflicting component: '%s')"
                % (
                    name,
                    "UNKNOWN" if old_object is None else old_object.name,
                    obj.name,
                )
            )
    else:
        #
        # Add the alias
        #
        self.aliases[name] = obj