code: def _ipy_objective(minimize, maximize):
      colspec, negate = _ipy_objective_colspec(minimize, maximize)
      try:
          cols = qparse.parse_colspec(colspec).cols
      except qparse.ParseError as e:
          raise ValueError(
              f"cannot parse objective {colspec!r}: {e}"
          ) from e
      else:
          if len(cols) > 1:
              raise ValueError(
                  f"invalid objective {colspec!r}: only one column may be specified"
              )
          scalar = cols[0]
          prefix, tag = scalar.split_key()
          return (prefix, tag, scalar.qualifier), negate
  
imports: import logging
  import os
  import typing
  import warnings
  from guild import _skopt
  from guild import batch_util
  from guild import flag_util
  from guild import op_util
  from guild import query
label_desc: Use image node_id 27 for calling a global function with example usage: _ipy_objective(minimize, maximize) and returns: prefix,  tag,  scalar,  negate