code: def _dim_args_and_initial(args, func_name, flag_name):
      if len(args) == 2:
          return args, None
      if len(args) == 3:
          return args[:2], args[2]
      raise InvalidSearchDimension(
          f"{func_name} requires 2 or 3 args, got {args} for flag {flag_name}"
      )
  
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 13 for calling a global function with example usage: _dim_args_and_initial(args, func_name, flag_name) and returns: args,  None, args,  args