code: def _flag_data_for_operation(source):
      """Returns a flag def for an 'operation' source.
  
      Because required operations (runs) are often specified by users, a
      flag is generated unless `flag-name` is explicitly set to false in
      the source config.
  
      As with file source generated flags, `arg-skip` is true to avoid
      passing resolved run IDs as command arguments.
  
      """
      assert source.parsed_uri.scheme == "operation", source.parsed_uri
      if source.flag_name is False:
          return None
      name, alias = _operation_flag_name_and_alias_for_source(source)
      return {
          "name": name,
          "alias": alias,
          "arg-skip": True,
          "default": _operation_flag_default(),
          "type": "string",
      }
  
file_path: guildai/guild/plugins/resource_flags.py
imports: import logging
  from guild import guildfile
  from guild import op_dep
  from guild import plugin
label_desc: Use image node_id 7 for calling a global function with example usage: _flag_data_for_operation(source) and returns: dict, None