code: def update_instrument_config(
          instrument, measured_center) -> Tuple[Point, float]:
      
      from copy import deepcopy
      from opentrons.trackers.pose_tracker import update
  
      robot = instrument.robot
      config = robot.config
      instrument_offset = deepcopy(config.instrument_offset)
  
      dx, dy, dz = array(measured_center) - config.tip_probe.center
  
      log.debug("This is measured probe center dx {}".format(Point(dx, dy, dz)))
      # any Z offset will adjust the tip length, so instruments have Z=0 offset
      old_x, old_y, _ = instrument_offset[instrument.mount][instrument.type]
      instrument_offset[instrument.mount][instrument.type] = \
          (old_x - dx, old_y - dy, 0.0)
      tip_length = deepcopy(config.tip_length)
      tip_length[instrument.name] = tip_length[instrument.name] + dz
  
      config = config \
          ._replace(instrument_offset=instrument_offset) \
          ._replace(tip_length=tip_length)
      robot.config = config
      log.debug("Updating config for {} instrument".format(instrument.mount))
      robot_configs.save_robot_settings(config)
  
      new_coordinates = change_base(
          robot.poses,
          src=instrument,
          dst=instrument.instrument_mover) - Point(dx, dy, 0.0)
      robot.poses = update(robot.poses, instrument, new_coordinates)
  
      return robot.config
docs: Update config and pose tree with instrument's x and y offsets
      and tip length based on delta between probe center and measured_center,
      persist updated config and return it