def create_object_if_not_exists(self, alias, name=None, *args, **kwargs):
    """Constructs the type with the given alias using the given args and kwargs.

    NB: aliases may be the alias' object type itself if that type is known.

    :API: public

    :param alias: Either the type alias or the type itself.
    :type alias: string|type
    :param *args: These pass through to the underlying callable object.
    :param **kwargs: These pass through to the underlying callable object.
    :returns: The created object, or an existing object with the same `name`.
    """
    if name is None:
      raise ValueError("Method requires an object `name`.")
    obj_creator = functools.partial(self.create_object,
                                    alias,
                                    name=name,
                                    *args,
                                    **kwargs)
    return self._storage.add_if_not_exists(name, obj_creator)
Constructs the type with the given alias using the given args and kwargs.

    NB: aliases may be the alias' object type itself if that type is known.

    :API: public

    :param alias: Either the type alias or the type itself.
    :type alias: string|type
    :param *args: These pass through to the underlying callable object.
    :param **kwargs: These pass through to the underlying callable object.
    :returns: The created object, or an existing object with the same `name`.