# Path: s3transfer/utils.py
# def get_callbacks(transfer_future, callback_type):
#     """Retrieves callbacks from a subscriber
# 
#     :type transfer_future: s3transfer.futures.TransferFuture
#     :param transfer_future: The transfer future the subscriber is associated
#         to.
# 
#     :type callback_type: str
#     :param callback_type: The type of callback to retrieve from the subscriber.
#         Valid types include:
#             * 'queued'
#             * 'progress'
#             * 'done'
# 
#     :returns: A list of callbacks for the type specified. All callbacks are
#         preinjected with the transfer future.
#     """
#     callbacks = []
#     for subscriber in transfer_future.meta.call_args.subscribers:
#         callback_name = 'on_' + callback_type
#         if hasattr(subscriber, callback_name):
#             callbacks.append(
#                 functools.partial(
#                     getattr(subscriber, callback_name), future=transfer_future
#                 )
#             )
#     return callbacks


import copy
import logging
from s3transfer.utils import get_callbacks
                    result.append(future.result())
            # Otherwise if the pending_value is a future, just wait for it.
            else:
                result = pending_value.result()
            # Add the retrieved value to the kwargs to be sent to the
            # main() call.
            kwargs[key] = result
        return kwargs


class SubmissionTask(Task):
    """A base class for any submission task

    Submission tasks are the top-level task used to submit a series of tasks
    to execute a particular transfer.
    """

    def _main(self, transfer_future, **kwargs):
        """
        :type transfer_future: s3transfer.futures.TransferFuture
        :param transfer_future: The transfer future associated with the
            transfer request that tasks are being submitted for

        :param kwargs: Any additional kwargs that you may want to pass
            to the _submit() method
        """
        try:
            self._transfer_coordinator.set_status_to_queued()

            # Before submitting any tasks, run all of the on_queued callbacks

# Path: s3transfer/utils.py
# def get_callbacks(transfer_future, callback_type):
#     """Retrieves callbacks from a subscriber
# 
#     :type transfer_future: s3transfer.futures.TransferFuture
#     :param transfer_future: The transfer future the subscriber is associated
#         to.
# 
#     :type callback_type: str
#     :param callback_type: The type of callback to retrieve from the subscriber.
#         Valid types include:
#             * 'queued'
#             * 'progress'
#             * 'done'
# 
#     :returns: A list of callbacks for the type specified. All callbacks are
#         preinjected with the transfer future.
#     """
#     callbacks = []
#     for subscriber in transfer_future.meta.call_args.subscribers:
#         callback_name = 'on_' + callback_type
#         if hasattr(subscriber, callback_name):
#             callbacks.append(
#                 functools.partial(
#                     getattr(subscriber, callback_name), future=transfer_future
#                 )
#             )
#     return callbacks


# Path: s3transfer/tasks.py
import copy
import logging
from s3transfer.utils import get_callbacks

                    result.append(future.result())
            # Otherwise if the pending_value is a future, just wait for it.
            else:
                result = pending_value.result()
            # Add the retrieved value to the kwargs to be sent to the
            # main() call.
            kwargs[key] = result
        return kwargs


class SubmissionTask(Task):
    """A base class for any submission task

    Submission tasks are the top-level task used to submit a series of tasks
    to execute a particular transfer.
    """

    def _main(self, transfer_future, **kwargs):
        """
        :type transfer_future: s3transfer.futures.TransferFuture
        :param transfer_future: The transfer future associated with the
            transfer request that tasks are being submitted for

        :param kwargs: Any additional kwargs that you may want to pass
            to the _submit() method
        """
        try:
            self._transfer_coordinator.set_status_to_queued()

            # Before submitting any tasks, run all of the on_queued callbacks

            on_queued_callbacks = get_callbacks(transfer_future, 'queued')