code: def _opref_data(run):
      if not run.opref:
          return None
      return {
          "pkgType": run.opref.pkg_type,
          "pkgName": run.opref.pkg_name,
          "pkgVersion": run.opref.pkg_version,
          "modelName": run.opref.model_name,
          "opName": run.opref.op_name,
      }
  
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 21 for calling a global function with example usage: _opref_data(run) and returns: dict, None