code: def _update_bracket(ab, fab, c, fc):
      """Update a bracket given (c, fc), return the discarded endpoints."""
      fa, fb = fab
      idx = 0 if np.sign(fa) * np.sign(fc) > 0 else 1
      rx, rfx = ab[idx], fab[idx]
      fab[idx] = fc
      ab[idx] = c
      return rx, rfx
  
imports: import warnings
  from collections import namedtuple
  import operator
  from .None import _zeros
  import numpy
label_desc: Use image node_id 11 for calling a global function with example usage: _update_bracket(ab, fab, c, fc) and returns: rx,  rfx