code: def get_target_length(
      src_len: int,
      targetlen_cap: int,
      targetlen_a: float,
      targetlen_b: float,
      targetlen_c: float,
  ) -> int:
      target_length = int(
          min(
              targetlen_cap,
              src_len * targetlen_a * targetlen_a
              + src_len * targetlen_b
              + targetlen_c,
          )
      )
      assert target_length > 0, (
          "Target length cannot be less than 0 src_len:"
          + str(src_len)
          + " target_length:"
          + str(target_length)
      )
      return target_length
  
file_path: pytext/pytext/torchscript/seq2seq/scripted_seq2seq_generator.py
imports: from typing import Dict, List, Optional, Tuple
  import torch
  from pytext.config import ConfigBase
  from pytext.models.module import Module
  from pytext.torchscript.seq2seq.beam_decode import BeamDecode
  from pytext.torchscript.seq2seq.beam_search import BeamSearch
label_desc: Use image node_id 1 for calling a global function with example usage: get_target_length(src_len, targetlen_cap, targetlen_a, targetlen_b, targetlen_c) and returns: target_length