def add_attribute(config, attr_name, attr_value):
    """
    Adds the new attribute and its value to the given config

    :param config: object of class CfgNode from yacs package
    :param attr_name: The name of the new attribute
    :param attr_value: The value of the new attribute
    :return: updated config
    """
    config.defrost()
    setattr(config, attr_name, attr_value)
    config.freeze()
    return config