def get_callbacks(transfer_future, callback_type):
callbacks = []<EOL>for subscriber in transfer_future.meta.call_args.subscribers:<EOL><INDENT>callback_name = '<STR_LIT>' + callback_type<EOL>if hasattr(subscriber, callback_name):<EOL><INDENT>callbacks.append(<EOL>functools.partial(<EOL>getattr(subscriber, callback_name),<EOL>future=transfer_future<EOL>)<EOL>)<EOL><DEDENT><DEDENT>return callbacks<EOL>
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.