def add_component(self, entity, component):
        """Add component to entity.

        Long-hand for :func:`essence.Entity.add`.

        :param entity: entity to associate
        :type entity: :class:`essence.Entity`
        :param component: component to add to the entity
        :type component: :class:`essence.Component`"""
        component_type = type(component)
        relation = self._get_relation(component_type)
        if entity in relation:
            # PYTHON2.6: Numbers required in format string.
            msg = "Component {0} can't be added to entity {1} since it already has a component of type {2}.".format(component, entity, component_type)
            raise DuplicateComponentError(msg)
        relation[entity] = component
        self._entities_with(component_type).add(entity)
Add component to entity.

        Long-hand for :func:`essence.Entity.add`.

        :param entity: entity to associate
        :type entity: :class:`essence.Entity`
        :param component: component to add to the entity
        :type component: :class:`essence.Component`