def METHOD_NAME(self, hint=None):
    default, variants = self.get_qualities()
    variant = hint if hint else default
    for name, caps in variants:
        if name == variant:
            return caps
    raise InvalidConfigError(
        f"Unknown video format {variant} for device {self.video.vendor_id:04x}:{self.video.model_id:04x}"  # pylint: disable=line-too-long
    )