code: def test_sync_execute(ray_start_regular_shared, create_cluster):
      client = create_cluster[0]
      assert client.session
      session = new_session(address=client.address)
      with session:
          raw = np.random.RandomState(0).rand(10, 5)
          a = mt.tensor(raw, chunk_size=5).sum(axis=1)
          b = a.execute(show_progress=False)
          assert b is a
          result = a.fetch()
          np.testing.assert_array_equal(result, raw.sum(axis=1))
  
          c = mt.tensor(raw, chunk_size=5).sum()
          d = session.execute(c)
          assert d is c
          assert abs(session.fetch(d) - raw.sum()) < 0.001
  
      assert get_default_session() is None
  
imports: import asyncio
  import copy
  import operator
  import os
  from functools import reduce
  import numpy
  import pytest
  from ....None import tensor
  from ....None import dataframe
  from ....learn.contrib.lightgbm.tests import test_classifier
  from ....oscar.errors import ReconstructWorkerError
  from ....session import get_default_session, new_session
  from ....tests.core import require_ray, mock, DICT_NOT_EMPTY
  from ....utils import lazy_import
  from ..ray import _load_config, ClusterStateActor, new_cluster
  from ..tests import test_local
  from .modules.utils import cleanup_third_party_modules_output, get_output_filenames
label_desc: Use image node_id 1 for calling a global function with example usage: test_sync_execute(ray_start_regular_shared, create_cluster) without return types