code: def repetition_penalty_fn(logits, ctx, theta=1.2):
      w = torch.ones(
          logits.shape[-1], dtype=torch.float, device=logits.device
      )
      for i in torch.unique(ctx):
          w[i] = theta
      return logits / w
  
file_path: performer-pytorch/performer_pytorch/autoregressive_wrapper.py
imports: from functools import partial
  import torch
  from torch import nn
  import torch.nn.functional
  from torch.nn.utils.rnn import pad_sequence
label_desc: Use image node_id 4 for calling a global function with example usage: repetition_penalty_fn(logits, ctx, theta) and returns: unknown