@classmethod
def infer_content_class(cls, base, build):
    """
        Identify and return the child class associated with the appropriate ContentType.

        For example, given the Package base class and a normal koji build, return
        the RpmPackage model class. Or, given the Build base class and a container
        build, return the ContainerBuild model class.

        Args:
            base (BodhiBase): A base model class, such as :class:`Build` or :class:`Package`.
            build (dict): Information about the build from the build system (koji).
        Returns:
            BodhiBase: The type-specific child class of base that is appropriate to use with the
            given koji build.
        """
    identity = cls.rpm
    extra = build.get('extra') or {}
    if 'module' in extra.get('typeinfo', {}):
        identity = cls.module
    elif 'container_koji_task_id' in extra:
        if 'flatpak' in extra['image']:
            identity = cls.flatpak
        else:
            identity = cls.container
    return base.find_polymorphic_child(identity)
