def get_obj_value(data_obj, attr, default=None):
    """Get dict's key or object's attribute with given attr"""
    if isinstance(data_obj, dict):
        return data_obj.get(attr, default)
    return getattr(data_obj, attr, default)