def METHOD_NAME(self, num_channels, preprocess_info):
    preprocess_info.init(num_channels)
    if self.mean_values is None:
        self.mean_values = [0] * num_channels
    if self.std_values is None:
        self.std_values = [1] * num_channels
    if isinstance(self.mean_values, tuple) and len(self.mean_values) == 1:
        self.mean_values = list(self.mean_values) * num_channels
    if isinstance(self.std_values, tuple) and len(self.std_values) == 1:
        self.std_values = list(self.std_values) * num_channels
    if len(self.mean_values) != num_channels or len(self.std_values) != num_channels:
        raise ConfigError('mean and std should be specified for all channels')
    for channel in range(num_channels):
        preprocess_info[channel].mean_value = self.mean_values[channel]
        preprocess_info[channel].std_scale = self.std_values[channel]