<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def upload_directory(self, directory, bucket, key, transfer_config=None, subscribers=None):
        ''' upload a directory using Aspera '''
        check_io_access(directory, os.R_OK)
        return self._queue_task(bucket, [FilePair(key, directory)], transfer_config,
                                subscribers, enumAsperaDirection.SEND)