code: def variable_length_to_fixed_length_categorical(
              self, left_edge=4, right_edge=4, max_length=15):
          
  
          cache_key = (
              "fixed_length_categorical",
              left_edge,
              right_edge,
              max_length)
  
          if cache_key not in self.encoding_cache:
              fixed_length_sequences = (
                  self.sequences_to_fixed_length_index_encoded_array(
                      self.sequences,
                      left_edge=left_edge,
                      right_edge=right_edge,
                      max_length=max_length))
              self.encoding_cache[cache_key] = fixed_length_sequences
          return self.encoding_cache[cache_key]
docs: Encode variable-length sequences using a fixed-length encoding designed
          for preserving the anchor positions of class I peptides.
          
          The sequences must be of length at least left_edge + right_edge, and at
          most max_length.
          
          Parameters
          ----------
          left_edge : int, size of fixed-position left side
          right_edge : int, size of the fixed-position right side
          max_length : sequence length of the resulting encoding
  
          Returns
          -------
          numpy.array of integers with shape (num sequences, max_length)