parameters: (
          self, num_tips: int = 1, starting_tip: Optional[WellImplementation] = None
      )
return_statement: return result
docstring: Find the next valid well for pick-up.
  
          Determines the next valid start tip from which to retrieve the
          specified number of tips. There must be at least `num_tips` sequential
          wells for which all wells have tips, in the same column.
  
          :param num_tips: target number of sequential tips in the same column
          :type num_tips: int
          :param starting_tip: The :py:class:`.Well` from which to start search.
                  for an available tip.
          :type starting_tip: :py:class:`.Well`
          :return: the :py:class:`.Well` meeting the target criteria, or None
docstring_summary: Find the next valid well for pick-up.
docstring_tokens: Find the next valid well for pick - up .
function: def next_tip(
          self, num_tips: int = 1, starting_tip: Optional[WellImplementation] = None
      ) -> Optional[WellImplementation]:
          """
          Find the next valid well for pick-up.
  
          Determines the next valid start tip from which to retrieve the
          specified number of tips. There must be at least `num_tips` sequential
          wells for which all wells have tips, in the same column.
  
          :param num_tips: target number of sequential tips in the same column
          :type num_tips: int
          :param starting_tip: The :py:class:`.Well` from which to start search.
                  for an available tip.
          :type starting_tip: :py:class:`.Well`
          :return: the :py:class:`.Well` meeting the target criteria, or None
          """
          columns: WellColumns = self._columns
          if starting_tip:
              # Remove columns preceding the one with the pipette's starting tip
              drop_undefined_columns = list(
                  dropwhile(lambda x: starting_tip not in x, columns)
              )
              # Remove tips preceding the starting tip in the first column
              drop_undefined_columns[0] = list(
                  dropwhile(lambda w: starting_tip is not w, drop_undefined_columns[0])
              )
              columns = drop_undefined_columns
  
          drop_leading_empties = [
              list(dropwhile(lambda x: not x.has_tip(), column)) for column in columns
          ]
          drop_at_first_gap = [
              list(takewhile(lambda x: x.has_tip(), column))
              for column in drop_leading_empties
          ]
          long_enough = [
              column for column in drop_at_first_gap if len(column) >= num_tips
          ]
  
          try:
              first_long_enough = long_enough[0]
              result: Optional[WellImplementation] = first_long_enough[0]
          except IndexError:
              result = None
  
          return result
function_tokens: def next_tip ( self , num_tips : int = 1 , starting_tip : Optional [ WellImplementation ] = None ) -> Optional [ WellImplementation ] : columns : WellColumns = self . _columns if starting_tip : # Remove columns preceding the one with the pipette's starting tip drop_undefined_columns = list ( dropwhile ( lambda x : starting_tip not in x , columns ) ) # Remove tips preceding the starting tip in the first column drop_undefined_columns [ 0 ] = list ( dropwhile ( lambda w : starting_tip is not w , drop_undefined_columns [ 0 ] ) ) columns = drop_undefined_columns drop_leading_empties = [ list ( dropwhile ( lambda x : not x . has_tip ( ) , column ) ) for column in columns ] drop_at_first_gap = [ list ( takewhile ( lambda x : x . has_tip ( ) , column ) ) for column in drop_leading_empties ] long_enough = [ column for column in drop_at_first_gap if len ( column ) >= num_tips ] try : first_long_enough = long_enough [ 0 ] result : Optional [ WellImplementation ] = first_long_enough [ 0 ] except IndexError : result = None return result