code: def test_resolve_delayed_returns(mock_deserializer):
      delayed_returns = [
          _DelayedReturn(
              uri=["s3://my-bucket/", "sub-folder-1/"],
              reference_path=(("__getitem__", 0),),
          ),
          _DelayedReturn(
              uri=["s3://my-bucket/", "sub-folder-1/"],
              reference_path=(("__getitem__", 1),),
          ),
          _DelayedReturn(
              uri=["s3://my-bucket/", "sub-folder-1/"],
              reference_path=(("__getitem__", 2),),
          ),
          _DelayedReturn(
              uri=["s3://my-bucket/", "sub-folder-1/"],
              reference_path=(
                  ("__getitem__", 2),
                  ("__getitem__", "key"),
              ),
          ),
          # index out of bounds
          _DelayedReturn(
              uri=["s3://my-bucket/", "sub-folder-1/"],
              reference_path=(("__getitem__", 3),),
          ),
          _DelayedReturn(uri=["s3://my-bucket/", "sub-folder-2/"]),
      ]
  
      mock_deserializer.return_value = (1, 2, {"key": 3})
      resolver = _DelayedReturnResolver(
          delayed_returns,
          "1234",
          _ParameterResolver(Context()),
          _ExecutionVariableResolver(Context()),
          sagemaker_session=None,
          s3_base_uri=f"s3://my-bucket/{PIPELINE_NAME}",
      )
  
      assert resolver.resolve(delayed_returns[0]) == 1
      assert resolver.resolve(delayed_returns[1]) == 2
      assert resolver.resolve(delayed_returns[2]) == {"key": 3}
      assert resolver.resolve(delayed_returns[3]) == 3
      with pytest.raises(IndexError):
          resolver.resolve(delayed_returns[4])
      assert resolver.resolve(delayed_returns[5]) == (1, 2, {"key": 3})
      assert mock_deserializer.call_count == 2
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/remote_function/core/test_pipeline_variables.py
imports: from __future__ import absolute_import
  import pytest
  from mock import patch, Mock
  from sagemaker.remote_function.core.pipeline_variables import _ParameterInteger, _ParameterFloat, _ParameterString, _ParameterBoolean, _ExecutionVariable, _Properties, _DelayedReturn, Context, _ParameterResolver, _ExecutionVariableResolver, _DelayedReturnResolver, resolve_pipeline_variables, convert_pipeline_variables_to_pickleable, _S3BaseUriIdentifier
  from sagemaker.workflow.parameters import ParameterInteger, ParameterFloat, ParameterString, ParameterBoolean
  from sagemaker.workflow.function_step import DelayedReturn
  from sagemaker.workflow.properties import Properties
label_desc: Use image node_id 1 for calling a global function with example usage: test_resolve_delayed_returns(mock_deserializer) without return types