human
Complete the below
def _get_query_timestamps(args=None):

    ''''Return any optional timestamp information in the request.
    Determine the desired range, if any, from the GET arguments. Set
    up the query range using the specified offset.
    [query_start ... start_timestamp ... end_timestamp ... query_end]
    Returns a dictionary containing:
    start_timestamp: First timestamp to use for query
    start_timestamp_op: First timestamp operator to use for query
    end_timestamp: Final timestamp to use for query
    end_timestamp_op: Final timestamp operator to use for query'
    '''

=====
Give me a Python program to determine the desired range, if any, from the GET arguments?
assistant
#Here is Python program to determine the desired range, if any, from the GET arguments.
    if (args is None):
        return {}
    search_offset = int(args.get('search_offset', 0))
    def _parse_timestamp(timestamp):
        if (not timestamp):
            return None
        try:
            iso_timestamp = timeutils.parse_isotime(timestamp)
            iso_timestamp = iso_timestamp.replace(tzinfo=None)
        except ValueError:
            raise wsme.exc.InvalidInput('timestamp', timestamp, 'invalid    timestamp    format')
        return iso_timestamp
    start_timestamp = _parse_timestamp(args.get('start_timestamp'))
    end_timestamp = _parse_timestamp(args.get('end_timestamp'))
    start_timestamp = ((start_timestamp - datetime.timedelta(minutes=search_offset)) if start_timestamp else None)
    end_timestamp = ((end_timestamp + datetime.timedelta(minutes=search_offset)) if end_timestamp else None)
    return {'start_timestamp': start_timestamp, 'end_timestamp': end_timestamp, 'start_timestamp_op': args.get('start_timestamp_op'), 'end_timestamp_op': args.get('end_timestamp_op')}