code: def standard_mock_instance_groups(self, instance_map=None):
      if instance_map is None:
          instance_map = [
              {"instance": "https://gce.example.com/res/gce-instance-1"}
          ]
  
      mock_instance_group_request = mock.MagicMock()
      mock_instance_group_request.execute.return_value = {
          "items": instance_map
      }
  
      service_attrs = {
          "listInstances.return_value": mock_instance_group_request,
          "listInstances_next.return_value": None,
      }
      mock_instance_groups = mock.Mock(**service_attrs)
      return mock_instance_groups
  
file_path: tensorflow-upstream/tensorflow/python/distribute/cluster_resolver/gce_cluster_resolver_test.py
imports: from tensorflow.python.distribute.cluster_resolver.cluster_resolver import UnionClusterResolver
  from tensorflow.python.distribute.cluster_resolver.gce_cluster_resolver import GCEClusterResolver
  from tensorflow.python.platform import test
  from tensorflow.python.training import server_lib
label_desc: Use image node_id 2 for calling the GCEClusterResolverTest obj's underlying member method code with example usage: obj.standard_mock_instance_groups(instance_map) and returns: mock_instance_groups