<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def real_time_sequencing(self, availability, oauth, event, target_calendars=()):
 """Generates an real time sequencing link to start the OAuth process with an event to be automatically upserted :param dict availability: - A dict describing the availability details for the event: :sequence: An Array of dics representing sequences to find availability for each sequence can contain. :sequence_id - A string identifying this step in the sequence. :ordinal - An Integer defining the order of this step in the sequence. :participants - A dict stating who is required for the availability call :required_duration - A dict stating the length of time the event will last for :event - A dict describing the event :available_periods - A dict stating the available periods for the step :available_periods - A dict stating the available periods for the sequence :param dict oauth: - A dict describing the OAuth flow required: :scope - A String representing the scopes to ask for within the OAuth flow :redirect_uri - A String containing a url to redirect the user to after completing the OAuth flow. :scope - A String representing additional state to be passed within the OAuth flow. :param dict event: - A dict describing the event :param list target_calendars: - An list of dics stating into which calendars to insert the created event See http://www.cronofy.com/developers/api#upsert-event for reference. """

        args = {
            'oauth': oauth,
            'event': event,
            'target_calendars': target_calendars
        }

        if availability:
            options = {}
            options['sequence'] = self.map_availability_sequence(availability.get('sequence', None))

            if availability.get('available_periods', None):
                self.translate_available_periods(availability['available_periods'])
                options['available_periods'] = availability['available_periods']

        args['availability'] = options

        return self.request_handler.post(endpoint='real_time_sequencing', data=args, use_api_key=True).json()