code: def _operation_flag_name_and_alias_for_source(source):
      """Returns a tuple of flag name and alias for an operation dependency.
  
      If `flag-name` is defined for `source` it is used with an alias of
      None. In this case the user has explicitly defined the interface
      and can provide an alias if need be.
  
      Similarly, if `name` is defined for `source` it is ued with an
      alias of None.
  
      If neither `flag-name` nor `name` is specified (the default case),
      the name is the source URI and the alias is the parsed URI
      path. This has the effect of showing the flag as
      `operation:<op-name>` in help text with support for the more
      convenient, shortened version of `<op-name>`.
      """
      if source.flag_name:
          return source.flag_name, None
      if source.name:
          return source.name, None
      return source.uri, source.parsed_uri.path
  
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 8 for calling a global function with example usage: _operation_flag_name_and_alias_for_source(source) and returns: source,  source, source,  None, source,  None