code: def decode(cls, encoded_token: str):
      try:
          decoded_token = base64.b64decode(encoded_token)
          parsed_token = json.loads(decoded_token)
          index = int(parsed_token.get("index"))
      except Exception as e:
          raise MlflowException.invalid_parameter_value(
              f"Invalid SearchRoutes token: {encoded_token}. The index is not defined as a "
              "value that can be represented as a positive integer."
          ) from e
  
      if index < 0:
          raise MlflowException.invalid_parameter_value(
              f"Invalid SearchRoutes token: {encoded_token}. The index cannot be negative."
          )
  
      return cls(index=index)
  
imports: import base64
  import functools
  import inspect
  import json
  import logging
  import posixpath
  import re
  import textwrap
  import warnings
  from typing import List, Optional
  from urllib.parse import urlparse
  from mlflow.environment_variables import MLFLOW_GATEWAY_URI
  from mlflow.exceptions import MlflowException
  from mlflow.gateway.constants import MLFLOW_AI_GATEWAY_MOSAICML_CHAT_SUPPORTED_MODEL_PREFIXES
  from mlflow.utils.uri import append_to_uri_path
label_desc: Use image node_id 3 for calling the SearchRoutesToken obj's underlying member method code with example usage: obj.decode(cls, encoded_token) and returns: cls