# Path: slo_generator/constants.py
# DEBUG = int(os.environ.get("DEBUG", "0"))


from datetime import datetime
from pathlib import Path
from dateutil import tz
from slo_generator.constants import DEBUG
    from google.cloud import storage
        from google.auth._default import _CLOUD_SDK_CREDENTIALS_WARNING
import argparse
import collections
import errno
import importlib
import logging
import os
import pprint
import re
import sys
import warnings
import yaml
            for var in match:
                try:
                    full_value = full_value.replace(f'${{{var}}}', ctx[var])
                except KeyError as exception:
                    LOGGER.error(f'Environment variable "{var}" should be set.',
                                 exc_info=True)
                    raise exception
            content = full_value
        return content

    if path:
        with Path(path).open(encoding='utf8') as config:
            content = config.read()
    if ctx:
        content = replace_env_vars(content, ctx)
    data = yaml.safe_load(content)
    if isinstance(data, str):
        error = (
            'Error serializing config into dict. This might be due to a syntax '
            'error in the YAML / JSON config file.')
        LOGGER.error(error)

    LOGGER.debug(pprint.pformat(data))
    return data


def setup_logging():
    """Setup logging for the CLI."""
    if DEBUG == 1:
        print(f'DEBUG mode is enabled. DEBUG={DEBUG}')

# Path: slo_generator/constants.py
# DEBUG = int(os.environ.get("DEBUG", "0"))


# Path: slo_generator/utils.py
from datetime import datetime
from pathlib import Path
from dateutil import tz
from slo_generator.constants import DEBUG
    from google.cloud import storage
        from google.auth._default import _CLOUD_SDK_CREDENTIALS_WARNING
import argparse
import collections
import errno
import importlib
import logging
import os
import pprint
import re
import sys
import warnings
import yaml

            for var in match:
                try:
                    full_value = full_value.replace(f'${{{var}}}', ctx[var])
                except KeyError as exception:
                    LOGGER.error(f'Environment variable "{var}" should be set.',
                                 exc_info=True)
                    raise exception
            content = full_value
        return content

    if path:
        with Path(path).open(encoding='utf8') as config:
            content = config.read()
    if ctx:
        content = replace_env_vars(content, ctx)
    data = yaml.safe_load(content)
    if isinstance(data, str):
        error = (
            'Error serializing config into dict. This might be due to a syntax '
            'error in the YAML / JSON config file.')
        LOGGER.error(error)

    LOGGER.debug(pprint.pformat(data))
    return data


def setup_logging():
    """Setup logging for the CLI."""
    if DEBUG == 1:
        print(f'DEBUG mode is enabled. DEBUG={DEBUG}')

        level = logging.DEBUG