code: def record(self, attn, buckets):
      if not self.on:
          return
      data = {
          "attn": attn.detach().cpu(),
          "buckets": buckets.detach().cpu(),
      }
      self.recordings[self.iter].append(data)
  
file_path: reformer-pytorch/reformer_pytorch/recorder.py
imports: from torch import nn
  from reformer_pytorch.reformer_pytorch import LSHAttention, LSHSelfAttention
  from collections import defaultdict
label_desc: Use image node_id 8 for calling the Recorder obj's underlying member method code with example usage: obj.record(attn, buckets) without return types