code: def test_list_related_models_inference_components_and_next_token():
      sagemaker_session = empty_sagemaker_session()
      sagemaker_session.list_inference_components = Mock(
          return_value={
              "InferenceComponents": [
                  {
                      "InferenceComponentName": "test_component_name",
                  }
              ],
              "NextToken": "next_token",
          }
      )
      predictor = Predictor(
          ENDPOINT, sagemaker_session=sagemaker_session
      )
  
      models, next_token_returned = predictor.list_related_models()
      request = {
          "endpoint_name_equals": ENDPOINT,
          "variant_name_equals": None,
          "name_contains": None,
          "creation_time_after": None,
          "creation_time_before": None,
          "last_modified_time_after": None,
          "last_modified_time_before": None,
          "status_equals": None,
          "sort_order": None,
          "sort_by": None,
          "max_results": None,
          "next_token": None,
      }
      sagemaker_session.list_inference_components.assert_called_with(
          **request
      )
      assert len(models) == 1 and next_token_returned == "next_token"
  
imports: from __future__ import absolute_import
  import io
  import json
  import pytest
  from mock import Mock, call, patch
  from sagemaker.deserializers import CSVDeserializer, PandasDeserializer
  from sagemaker.enums import EndpointType
  from sagemaker.model_monitor.model_monitoring import DEFAULT_REPOSITORY_NAME
  from sagemaker.predictor import Predictor
  from sagemaker.serializers import JSONSerializer, CSVSerializer
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
label_desc: Use image node_id 30 for calling a global function with example usage: test_list_related_models_inference_components_and_next_token() without return types