def __init__(self, groups=None):
        super(GroupedRequirements, self).__init__(NamedRequirements)
        self.groups = groups or self.default_groups
        self.filename = None
        self.create_default_groups()
def setup(
        self, stage: Optional[str] = None, local_rank: Optional[int] = None, log_dir: Optional[str] = None
    ) -> None:
        """Execute arbitrary pre-profiling set-up steps."""
        self._stage = stage
        self._local_rank = local_rank
        self._log_dir = log_dir
        self.dirpath = self.dirpath or log_dir