def offline_query(draw, instrument=offline_instruments()): """ Strategy for any valid offline query """ query = draw(instrument) # If we have AttrAnd then we don't have GOES if isinstance(query, a.Instrument) and query.value == 'goes': query &= draw(goes_time()) else: query = attr.and_(query, draw(time_attr())) return query