code: def adjust_logits_during_generation(
      self, logits, cur_len: int, max_length: int
  ):
      if cur_len == 1 and self.config.force_bos_token_to_be_generated:
          logits = self._force_token_id_to_be_generated(
              logits, self.config.bos_token_id
          )
      elif (
          cur_len == max_length - 1
          and self.config.eos_token_id is not None
      ):
          logits = self._force_token_id_to_be_generated(
              logits, self.config.eos_token_id
          )
      return logits
  
imports: import copy
  import itertools
  from typing import List, Optional, Tuple
  import torch
  import torch.nn.functional
  from transformers import BartConfig
  from transformers.generation_utils import GenerationMixin
label_desc: Use image node_id 3 for calling the BARTBeamSearchGenerator obj's underlying member method code with example usage: obj.adjust_logits_during_generation(logits, cur_len, max_length) and returns: logits