@staticmethod
def _get_attribute_or(item, keys, default=None):
    """
        Fetch an attribute from an object. Keys is a list of attribute names and indices to use to
        fetch the property. Returns the passed default object if the path through the object
        does not exist.
        :param item: The object to get from
        :type item: object
        :param keys: The list of keys and indices for the property
        :type keys: A list of string or int
        :param default: The default object to use if a property could not be found
        :type default: object
        :return: The requested property or the default value if missing
        :rtype: object
        """
    try:
        for key in keys:
            if type(key) is str:
                item = getattr(item, key)
            elif type(key) is int:
                item = item[key]
        return item
    except (AttributeError, IndexError):
        return default
