def run(self, inputs, outputs):
    'Run import.'
    secret_path = (Path('/secrets') / inputs.access_token_secret['handle'])
    session = Session()
    atexit.register(on_exit, session)
    try:
        file_id = inputs.file_id
        access_token = get_token_from_secret_file(secret_file_path=secret_path, error=self.error)
        headers = {'x-access-token': access_token}
        (file_name, file_size) = get_file_properties(session=session, file_id=file_id, request_headers=headers, error=self.error)
        download_file_repeatedly(tries=inputs.advanced.tries, session=session, file_id=file_id, file_name=file_name, expected_file_size=file_size, request_headers=headers, error=self.error)
        output(inputs.advanced.output, f'filename={file_name}')
    except Exception as error:
        if inputs.advanced.verbose:
            traceback.print_exc()
            self.error('Unexpected error occurred while trying to download files from BaseSpace. Check standard output for more details.')
        else:
            print(str(error))
            self.error('Unexpected error occurred while trying to download files from BaseSpace. Set Verbose to True to see the traceback.')
    outputs.file = file_name
Run import.
def run(self, inputs, outputs):
    
    secret_path = (Path('/secrets') / inputs.access_token_secret['handle'])
    session = Session()
    atexit.register(on_exit, session)
    try:
        file_id = inputs.file_id
        access_token = get_token_from_secret_file(secret_file_path=secret_path, error=self.error)
        headers = {'x-access-token': access_token}
        (file_name, file_size) = get_file_properties(session=session, file_id=file_id, request_headers=headers, error=self.error)
        download_file_repeatedly(tries=inputs.advanced.tries, session=session, file_id=file_id, file_name=file_name, expected_file_size=file_size, request_headers=headers, error=self.error)
        output(inputs.advanced.output, f'filename={file_name}')
    except Exception as error:
        if inputs.advanced.verbose:
            traceback.print_exc()
            self.error('Unexpected error occurred while trying to download files from BaseSpace. Check standard output for more details.')
        else:
            print(str(error))
            self.error('Unexpected error occurred while trying to download files from BaseSpace. Set Verbose to True to see the traceback.')
    outputs.file = file_name