import torch


def q(x: torch.Tensor,
      min_value: int,
      max_value: int,
      scale: float,
      zero_point: int = 0) -> torch.Tensor:
    """
    Fake-quantize the input tensor x, using a pytorch fake-quantization node.
    Args:
        x: input tensor to quantize.
        min_value: lower bound of the quantized domain.
        max_value: upper bound of the quantized domain.
        scale: quantization scale.
        zero_point: quantization zero_point
    Returns:
        The fake-quantized input tensor.
    """

    return torch.fake_quantize_per_tensor_affine(x,
                                                 scale=scale,
                                                 zero_point=zero_point,
                                                 quant_min=min_value,
                                                 quant_max=max_value)