human
Complete this python program:
def allitems(attr=None, doc=''):
assistant
#Here is the Python code you requested.

    """Returns a property that fetches the given attributes from
    all items in a SearchIO container object.
    """
    def getter(self):
        if (attr is None):
            return self._items
        return [getattr(frag, attr) for frag in self._items]
    return property(fget=getter, doc=doc)