def METHOD_NAME(image: TensorLike, bins: int = 256) -> tf.Tensor:
    """Implements Equalize function from PIL using TF ops."""
    image = tf.stack(
        [_scale_channel(image, c, bins) for c in range(image.shape[-1])], -1
    )
    return image