code: def get_default_session_config():
      """Create a default session config."""
      session_config = config_pb2.ConfigProto()
      session_config.allow_soft_placement = True
      session_config.gpu_options.allow_growth = True
      # session_config.log_device_placement = True
  
      # enable scoped_allocator for collective_ops
      rewrite_options = session_config.graph_options.rewrite_options
      rewrite_options.scoped_allocator_optimization = (
          rewriter_config_pb2.RewriterConfig.ON
      )
      del rewrite_options.scoped_allocator_opts.enable_op[:]
      rewrite_options.scoped_allocator_opts.enable_op.append(
          "CollectiveReduce"
      )
      return session_config
  
file_path: autodist/autodist/runner.py
imports: import hashlib
  import os
  from tensorflow.core.protobuf import config_pb2, rewriter_config_pb2
  from tensorflow.python.client import timeline, session
  import autodist.autodist
  import autodist.const
  from autodist.const import ENV, MAX_INT32
  from autodist.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: get_default_session_config() and returns: session_config