import yaml


def read_yaml(yaml_file):
    """Read a yaml file.

    Args:
        yaml_file (str): Full path of the yaml file.

    Returns:
        data (dict): Dictionary of yaml_file contents. None is returned if an
        error occurs while reading.
    """

    data = None
    with open(yaml_file) as f:
        # use safe_load instead load
        data = yaml.safe_load(f)
    return data