class_docstr: Implement file API with focus on Arrow support
  
  Memoization in this class is based on reference equality, while plotter is based on hash.
  That means the plotter resolves different-identity value matches, so by the time ArrowFileUploader compares,
  identities are unified for faster reference-based checks.
  
  Example: Upload files with per-session memoization
      uploader : ArrowUploader
      arr : pa.Table
      afu = ArrowFileUploader(uploader)
  
      file1_id = afu.create_and_post_file(arr)[0]
      file2_id = afu.create_and_post_file(arr)[0]
  
      assert file1_id == file2_id # memoizes by default (memory-safe: weak refs)
  
  Example: Explicitly create a file and upload data for it
      uploader : ArrowUploader
      arr : pa.Table
      afu = ArrowFileUploader(uploader)
  
      file1_id = afu.create_file()
      afu.post_arrow(arr, file_id)
  
      file2_id = afu.create_file()
      afu.post_arrow(arr, file_id)
  
      assert file1_id != file2_id
class_docstr_tok: ["Implement","file","API","with","focus","on","Arrow","support","Memoization","in","this","class","is","based","on","reference","equality",",","while","plotter","is","based","on","hash",".","That","means","the","plotter","resolves","different-identity","value","matches",",","so","by","the","time","ArrowFileUploader","compares",",","identities","are","unified","for","faster","reference-based","checks",".","Example",":","Upload","files","with","per-session","memoization","uploader",":","ArrowUploader","arr",":","pa.Table","afu","=","ArrowFileUploader","(","uploader",")","file1_id","=","afu.create_and_post_file","(","arr",")","[","0","]","file2_id","=","afu.create_and_post_file","(","arr",")","[","0","]","assert","file1_id","==","file2_id","#","memoizes","by","default","(","memory-safe",":","weak","refs",")","Example",":","Explicitly","create","a","file","and","upload","data","for","it","uploader",":","ArrowUploader","arr",":","pa.Table","afu","=","ArrowFileUploader","(","uploader",")","file1_id","=","afu.create_file","(",")","afu.post_arrow","(","arr",",","file_id",")","file2_id","=","afu.create_file","(",")","afu.post_arrow","(","arr",",","file_id",")","assert","file1_id","!","=","file2_id"]
code: def __init__(self, uploader):  # ArrowUploader
      self.uploader = uploader
  
file_path: pygraphistry/graphistry/ArrowFileUploader.py
imports: import pyarrow, requests, sys
  from functools import lru_cache
  from typing import Any, Tuple, Optional
  from weakref import WeakKeyDictionary
  from .util import setup_logger
label_desc: Use image node_id 1 to create a new ArrowFileUploader object  with example: obj = ArrowFileUploader(uploader)