in lib/metric-config-parser/metric_config_parser/experiment.py [0:0]
def randomization_unit(self) -> Optional[RandomizationUnit]:
if hasattr(self.experiment, "bucket_config") and self.experiment.bucket_config is not None:
# this will raise a ValueError if the provided randomization_unit is invalid
return RandomizationUnit(self.experiment.bucket_config.randomization_unit)
return None