code: def setup_client():
      """Get a Client and initialize it.
  
      This assumes that all nodes see a shared filesystem.
      """
      global _client
      if _client is None:
          _client = parallel.Client()
          mydir = os.path.split(os.path.abspath(__file__))[0]
  
          def cd(path):
              import os
  
              os.chdir(path)
  
          _client[:].apply_sync(cd, mydir)
      return _client
  
file_path: nipy/examples/ds105/parallel_run.py
imports: import os
  import numpy
  from IPython import parallel
label_desc: Use image node_id 1 for calling a global function with example usage: setup_client() and returns: _client