docstr: Sets maximum input length.
  Pre-calculates internal seq_range mask.
code: def set_max_len(self, max_len, seq_range=None):
      """Sets maximum input length.
      Pre-calculates internal seq_range mask.
      """
      self.max_len = max_len
      if seq_range is None:
          device = next(self.parameters()).device
          seq_range = torch.arange(0, self.max_len, device=device)
      if hasattr(self, "seq_range"):
          self.seq_range = seq_range
      else:
          self.register_buffer("seq_range", seq_range, persistent=False)
  
imports: import math
  from typing import Callable, Iterable, List, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from torch.nn.init import _calculate_correct_fan
  from torch.nn.modules.utils import _single
  from nemo.collections.common.parts.utils import activation_registry
  from nemo.core.classes.mixins import AccessMixin
  from nemo.core.classes.mixins.adapter_mixins import AdapterModuleMixin
  from nemo.utils import logging
label_desc: Use image node_id 5 for calling the SqueezeExcite obj's underlying member method code with example usage: obj.set_max_len(max_len, seq_range) without return types