def get_attrs(obj, config_attrs):
    """
    Given an object obtains the attributes different to None.
    :param obj: object containing the attributes.
    :param config_attrs: a list of all the configurable attributes within the
        object.
    :return attr_data_dict: A dictionary containing all the attributes of the
        given object that have a value different to None.
    """
    attr_data_dict = {}
    for attr_name in config_attrs:
        attr_data_dict[attr_name] = getattr(obj, attr_name)
    return attr_data_dict