code: def as_data(op_cmd):
      data = {
          "cmd-args": op_cmd.cmd_args,
      }
      if op_cmd.cmd_env:
          data["cmd-env"] = op_cmd.cmd_env
      cmd_flags_data = _cmd_flags_as_data(op_cmd.cmd_flags)
      if cmd_flags_data:
          data["cmd-flags"] = cmd_flags_data
      if op_cmd.flags_dest:
          data["flags-dest"] = op_cmd.flags_dest
      return data
  
imports: import logging
  import pprint
  from guild import flag_util
  from guild import util
  from guild import yaml_util
label_desc: Use image node_id 28 for calling a global function with example usage: as_data(op_cmd) and returns: data