import yaml


def read_config_file(config_file):
    """
    Read the yaml config file specified.

    :param config_file: path to config file.
    :return: Object representing contents of config file.
    """
    config_file_data = {}
    if config_file:
        with open(config_file) as file_handle:
            config_file_data = yaml.safe_load(file_handle)

    return config_file_data