class_docstr: Temporal Entropy Model
class_docstr_tok: ["Temporal","Entropy","Model"]
docstr: Extract the previously procesed latents, repeating them if the
  number of processed latents is less than the context legnth
  
  Args:
      previous_latents: sequence of sizse at most `context_len`, containing object
          of type PreviousLatent, with two attributes:
              - `processed` tensor of shape [b', seq_len_enc, d_model]
              - `quantized` tensor of shape [B, C, H, W], NOT needed in this method
  
  Returns:
      List of length `context_len` with tensors of shape [b', seq_len_enc, d_model],
          containing `processed` data only (encoder processed data).
docstr_tok: ["Extract","the","previously","procesed","latents",",","repeating","them","if","the","number","of","processed","latents","is","less","than","the","context","legnth","Args",":","previous_latents",":","sequence","of","sizse","at","most","`","context_len","`",",","containing","object","of","type","PreviousLatent",",","with","two","attributes",":","-","`","processed","`","tensor","of","shape","[","b","'",",","seq_len_enc",",","d_model","]","-","`","quantized","`","tensor","of","shape","[","B",",","C",",","H",",","W","]",",","NOT","needed","in","this","method","Returns",":","List","of","length","`","context_len","`","with","tensors","of","shape","[","b","'",",","seq_len_enc",",","d_model","]",",","containing","`","processed","`","data","only","(","encoder","processed","data",")","."]
code: def _get_encoded_seqs(
      self, previous_latents: Sequence[PreviousLatent]
  ) -> List[Tensor]:
      """
      Extract the previously procesed latents, repeating them if the
      number of processed latents is less than the context legnth
  
      Args:
          previous_latents: sequence of sizse at most `context_len`, containing object
              of type PreviousLatent, with two attributes:
                  - `processed` tensor of shape [b', seq_len_enc, d_model]
                  - `quantized` tensor of shape [B, C, H, W], NOT needed in this method
  
      Returns:
          List of length `context_len` with tensors of shape [b', seq_len_enc, d_model],
              containing `processed` data only (encoder processed data).
      """
      encoded_seqs = [p.processed for p in previous_latents]
      if len(encoded_seqs) < self.context_len:
          if self.context_len == 2:
              # encoded_seqs is a list of size 1
              return encoded_seqs * 2  # [b', seq_len_enc, d_model]*2
          elif self.context_len == 3:
              return (
                  encoded_seqs * 3  # [b', seq_len_enc, d_model]*3
                  if len(encoded_seqs) == 1
                  # repeat the 0th twice
                  else [encoded_seqs[0]] * 2 + [encoded_seqs[1]]
              )
          else:
              ValueError(f"Unsupported context_len={self.context_len}")
      return encoded_seqs
  
imports: import itertools
  import sys
  from typing import Dict, List, NamedTuple, Optional, Sequence, Tuple
  import torch
  import torch.nn
  from torch import Tensor
  from .bottlenecks import GsnConditionalLocScaleShift
  from .entropy_model_layers import EncoderSection, LearnedPosition, StartSym, Transformer
  from .layers_utils import make_embedding
  from .patcher import Patcher
label_desc: Use image node_id 6 for calling the VCTEntropyModel obj's underlying member method code with example usage: obj._get_encoded_seqs(previous_latents) and returns: encoded_seqs, unknown, unknown