def _validate_yaml_dict(yaml_dict):
    """Validate dict parsed from yaml configuration file
    :param yaml_dict: dict parsed from yaml configuration file
    :raises TypeError: if configuration file has several levels of nesting or param is not dict
    """
    if not isinstance(yaml_dict, dict):
        raise TypeError(f'configuration file has several levels of nesting.')
    for key, value in yaml_dict.items():
        if not isinstance(key, str) or isinstance(value, dict):
            raise TypeError(
                f'configuration file has several levels of nesting.')
