code: def _opref_for_string(s):
      """Parses user-provided string to opref.
  
      See _opref_for_run for parsing a saved opref attr.
      """
      m = re.match(r"(?:(?:([^/]+)/)?([^:]+):)?([^/:]+)$", s)
      if not m:
          raise OpRefError(f"invalid reference: {s!r}")
      pkg_name, model_name, op_name = m.groups()
      return OpRef(None, pkg_name, None, model_name, op_name)
  
file_path: guildai/guild/opref.py
imports: import collections
  import logging
  import os
  import re
  from guild import util
label_desc: Use image node_id 4 for calling a global function with example usage: _opref_for_string(s) and returns: OpRef