@classmethod
def _get_element(cls, container, index, default):
    """Get an element from the container if it exists, otherwise return
        the default.

        Args:
            container (obj): Object that should be returned from.
            index (obj): Index of element that should be returned.
            default (obj): Default that should be returned if the index is not
                in the container.

        Returns:
            object: Container contents at specified element.

        """
    out = default
    if cls._has_element(container, index):
        out = container[index]
    return out
