@staticmethod
    def new_by_type(build_name, *args, **kwargs):
        """Find BuildRequest with the given name."""

        # Compatibility
        if build_name in (PROD_WITHOUT_KOJI_BUILD_TYPE,
                          PROD_WITH_SECRET_BUILD_TYPE):
            build_name = PROD_BUILD_TYPE

        try:
            build_class = build_classes[build_name]
            logger.debug("Instantiating: %s(%s, %s)", build_class.__name__, args, kwargs)
            return build_class(*args, **kwargs)
        except __HOLE__:
            raise RuntimeError("Unknown build type '{0}'".format(build_name))
dataset/ETHPy150Open projectatomic/osbs-client/osbs/build/build_request.py/BuildRequest.new_by_type