code: def brevity_penalty(alpha, length):
      """Brevity penalty function for beam search penalizing short sequences.
  
      Args:
        alpha: float: brevity-penalty scaling parameter.
        length: int: length of considered sequence.
  
      Returns:
        Brevity penalty score as jax scalar.
      """
      return jnp.power(((5.0 + length) / 6.0), alpha)
  
file_path: scenic/scenic/projects/avatar/decode.py
imports: import typing
  import flax
  import jax
  from jax import lax
  import jax.numpy
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: brevity_penalty(alpha, length) and returns: jnp