code: def integer_label_protein(sequence, max_length=1200):
      """
      Integer encoding for protein string sequence.
  
      Args:
          sequence (str): Protein string sequence.
          max_length: Maximum encoding length of input protein string. (default: 1200)
      """
      encoding = np.zeros(max_length)
      for idx, letter in enumerate(sequence[:max_length]):
          try:
              letter = letter.upper()
              encoding[idx] = CHARPROTSET[letter]
          except KeyError:
              logging.warning(
                  f"character {letter} does not exists in sequence category encoding, skip and treat as "
                  f"padding."
              )
      return encoding
  
imports: import logging
  import numpy
  from rdkit import Chem
label_desc: Use image node_id 2 for calling a global function with example usage: integer_label_protein(sequence, max_length) and returns: encoding