code: def run_data(run, index=None, api_version=1):
      if api_version == 1:
          return _run_data_v1(run, index)
      if api_version == 2:
          return _run_data_v2(run, index)
      assert False, api_version
  
imports: import json
  import logging
  import os
  import re
  import socket
  import sys
  import guild
  import guild.run
  from guild import batch_util
  from guild import cli
  from guild import click_util
  from guild import config
  from guild import index
  from guild import run_util
  from guild import util
  from guild import var
  from guild import view
  from .None import compare_impl
  from .None import runs_impl
label_desc: Use image node_id 1 for calling a global function with example usage: run_data(run, index, api_version) and returns: _run_data_v1, _run_data_v2