def upload_data_to_s3(data):
    """
    Uploads our randomly generated dataframe to S3 and returns the S3 file handle
    """
    filename = 'foo.csv'
    data.to_csv(filename, index=False)

    with open(filename, 'rb') as fh:
        materialization, s3_handle = file_handle_to_s3(fh)

    yield s3_handle
 def test():
     return file_handle_to_s3(emit_temp_handle())