code: def set_current_mount(hardware, session):
      
  
      pipette = None
      right_channel = None
      left_channel = None
      right_pipette, left_pipette = get_pipettes(hardware)
      if right_pipette:
          if not feature_flags.use_protocol_api_v2():
              right_channel = right_pipette.channels
          else:
              right_channel = right_pipette.get('channels')
              right_pipette['mount'] = 'right'
  
      if left_pipette:
          if not feature_flags.use_protocol_api_v2():
              left_channel = left_pipette.channels
          else:
              left_channel = left_pipette.get('channels')
              left_pipette['mount'] = 'left'
  
      if right_channel == 1:
          pipette = right_pipette
      elif left_channel == 1:
          pipette = left_pipette
      elif right_pipette:
          pipette = right_pipette
          session.cp = CriticalPoint.FRONT_NOZZLE
      elif left_pipette:
          pipette = left_pipette
          session.cp = CriticalPoint.FRONT_NOZZLE
  
      model, id = _get_model_name(pipette, hardware)
      session.pipette_id = id
      return {'pipette': pipette, 'model': model}
docs: Choose the pipette in which to execute commands. If there is no pipette,
      or it is uncommissioned, the pipette is not mounted.
  
      :attached_pipettes attached_pipettes: Information obtained from the current
      pipettes attached to the robot. This looks like the following:
      :dict with keys 'left' and 'right' and a model string for each
      mount, or 'uncommissioned' if no model string available
      :return: The selected pipette