def METHOD_NAME(
    reduction_shape, q: float, num_samples: int, inplace: bool
) -> TensorStatisticCollectorBase:
    tensor_collector = TensorCollector(OVMinMaxTensorStatistic)
    quantile_reducer = OVQuantileReducer(reduction_shape, (q, 1 - q), inplace)
    for port_id, container_key in enumerate([OVMinMaxTensorStatistic.MIN_STAT, OVMinMaxTensorStatistic.MAX_STAT]):
        aggregator = MedianAggregator(OVNNCFCollectorTensorProcessor, num_samples=num_samples)
        tensor_collector.register_statistic_branch(container_key, quantile_reducer, aggregator, port_id)
    return tensor_collector