parameters: (docks, dock_direction, dock_layer=-1, dock_row=-1, reverse=False)
return_statement: return arr
docstring: This is an internal function that returns a list of docks which meet
      the specified conditions in the parameters and returns a sorted array
      (sorted by layer and then row).
  
      :param `docks`: a list of :class:`AuiDockInfo`;
      :param integer `dock_direction`: the :class:`AuiDockInfo` docking direction to analyze;
      :param integer `dock_layer`: the :class:`AuiDockInfo` layer to analyze.
      :param integer `dock_row`: the :class:`AuiDockInfo` row to analyze;
docstring_summary: This is an internal function that returns a list of docks which meet
      the specified conditions in the parameters and returns a sorted array
      (sorted by layer and then row).
docstring_tokens: This is an internal function that returns a list of docks which meet the specified conditions in the parameters and returns a sorted array ( sorted by layer and then row ) .
function: def FindDocks(docks, dock_direction, dock_layer=-1, dock_row=-1, reverse=False):
      """
      This is an internal function that returns a list of docks which meet
      the specified conditions in the parameters and returns a sorted array
      (sorted by layer and then row).
  
      :param `docks`: a list of :class:`AuiDockInfo`;
      :param integer `dock_direction`: the :class:`AuiDockInfo` docking direction to analyze;
      :param integer `dock_layer`: the :class:`AuiDockInfo` layer to analyze.
      :param integer `dock_row`: the :class:`AuiDockInfo` row to analyze;
      """
  
      matchDocks = [(d.dock_layer, d.dock_row, d.dock_direction, d) for d in docks if \
                    (dock_direction == -1 or dock_direction == d.dock_direction) and \
                    ((dock_layer == -1 or dock_layer == d.dock_layer) and \
                    (dock_row == -1 or dock_row == d.dock_row))]
  
      arr = [x[-1] for x in sorted(matchDocks, reverse=reverse)]
  
      return arr
function_tokens: def FindDocks ( docks , dock_direction , dock_layer = - 1 , dock_row = - 1 , reverse = False ) : matchDocks = [ ( d . dock_layer , d . dock_row , d . dock_direction , d ) for d in docks if ( dock_direction == - 1 or dock_direction == d . dock_direction ) and ( ( dock_layer == - 1 or dock_layer == d . dock_layer ) and ( dock_row == - 1 or dock_row == d . dock_row ) ) ] arr = [ x [ - 1 ] for x in sorted ( matchDocks , reverse = reverse ) ] return arr