code: def mix(self,
              repetitions: int = 1,
              volume: float = None,
              location: Union[types.Location, Well] = None,
              rate: float = 1.0) -> 'InstrumentContext':
          
          self._log.debug(
              'mixing {}uL with {} repetitions in {} at rate={}'.format(
                  volume, repetitions,
                  location if location else 'current position', rate))
          if not self.hw_pipette['has_tip']:
              raise hc.NoTipAttachedError('Pipette has no tip. Aborting mix()')
  
          self.aspirate(volume, location, rate)
          while repetitions - 1 > 0:
              self.dispense(volume, rate=rate)
              self.aspirate(volume, rate=rate)
              repetitions -= 1
          self.dispense(volume, rate=rate)
          return self
docs: Mix a volume of liquid (uL) using this pipette.
          If no location is specified, the pipette will mix from its current
          position. If no Volume is passed, 'mix' will default to its max_volume.
  
          :param repetitions: how many times the pipette should mix (default: 1)
          :param volume: number of microlitres to mix (default: self.max_volume)
          :param location: a Well or a position relative to well.
                           e.g, `plate.rows()[0][0].bottom()`
                           (types.Location type).
          :param rate: Set plunger speed for this mix, where,
                       speed = rate * (aspirate_speed or dispense_speed)
          :raises NoTipAttachedError: If no tip is attached to the pipette.
          :returns: This instance