code: def op_info_for_opdef(opdef):
      from guild import flag_util
  
      return {
          "opref": _opref_data(opdef.opref),
          "name": opdef.name,
          "fullname": opdef.fullname,
          "description": opdef.description,
          "guildfile": {
              "dir": os.path.abspath(opdef.guildfile.dir),
              "src": opdef.guildfile.src,
          },
          "flags": {
              f.name: {
                  "default": f.default,
                  "defaultAssign": flag_util.flag_assign(
                      f.name, f.default
                  ),
                  "description": f.description,
                  "choices": _flag_choices_data(f.choices),
                  "type": f.type,
              }
              for f in opdef.flags
          },
      }
  
file_path: guildai/guild/commands/api_help_op.py
imports: import os
  import click
  from guild import click_util
  from .None import api_support
  from .None import run
label_desc: Use image node_id 3 for calling a global function with example usage: op_info_for_opdef(opdef) and returns: dict