code: def calibrate_container_with_instrument(self,
                                              container: Container,
                                              instrument,
                                              save: bool
                                              ):
          '''Calibrates a container using the bottom of the first well'''
          well = container[0]
  
          # Get the relative position of well with respect to instrument
          delta = pose_tracker.change_base(
              self.poses,
              src=instrument,
              dst=well
          )
  
          if fflags.calibrate_to_bottom():
  
              delta_x = delta[0]
              delta_y = delta[1]
              if 'tiprack' in container.get_type():
                  delta_z = delta[2]
              else:
                  delta_z = delta[2] + well.z_size()
          else:
              delta_x = delta[0]
              delta_y = delta[1]
              delta_z = delta[2]
  
          self.poses = self._calibrate_container_with_delta(
              self.poses,
              container,
              delta_x,
              delta_y,
              delta_z,
              save
          )
  
          self.max_deck_height.cache_clear(f calibrate_container_with_instrument(self,
                                              container: Container,
                                              instrument,
                                              save: bool
                                              ):
          '''Calibrates a container using the bottom of the first well'''
          well = container[0]
  
          # Get the relative position of well with respect to instrument
          delta = pose_tracker.change_base(
              self.poses,
              src=instrument,
              dst=well
          )
  
          if fflags.calibrate_to_bottom():
  
              delta_x = delta[0]
              delta_y = delta[1]
              if 'tiprack' in container.get_type():
                  delta_z = delta[2]
              else:
                  delta_z = delta[2] + well.z_size()
          else:
              delta_x = delta[0]
              delta_y = delta[1]
              delta_z = delta[2]
  
          self.poses = self._calibrate_container_with_delta(
              self.poses,
              container,
              delta_x,
              delta_y,
              delta_z,
              save
          )
  
          self.max_deck_height.cache_clear()
docs: Calibrates a container using the bottom of the first well