class_docstr: A MVPA class, inherited from Optimizer.
  
  This is the designed class to define MVPA-related
  variables and methods.
  
  References:
      H. Bouchekara. Most Valuable Player Algorithm: a novel optimization algorithm inspired from sport.
      Operational Research (2017).
class_docstr_tok: ["A","MVPA","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","MVPA-related","variables","and","methods",".","References",":","H.","Bouchekara",".","Most","Valuable","Player","Algorithm",":","a","novel","optimization","algorithm","inspired","from","sport",".","Operational","Research","(","2017",")","."]
docstr: Gets a set of agents from a specified team.
  
  Args:
      agents: List of agents.
      index: Index of team.
  
  Returns:
      (List[Agent]): A sorted list of agents that belongs to the specified team.
docstr_tok: ["Gets","a","set","of","agents","from","a","specified","team",".","Args",":","agents",":","List","of","agents",".","index",":","Index","of","team",".","Returns",":","(","List","[","Agent","]",")",":","A","sorted","list","of","agents","that","belongs","to","the","specified","team","."]
code: def _get_agents_from_team(
      self, agents: List[Agent], index: int
  ) -> List[Agent]:
      """Gets a set of agents from a specified team.
  
      Args:
          agents: List of agents.
          index: Index of team.
  
      Returns:
          (List[Agent]): A sorted list of agents that belongs to the specified team.
  
      """
  
      start, end = index * self.n_p, (index + 1) * self.n_p
  
      if (index + 1) == self.n_teams:
          return sorted(agents[start:], key=lambda x: x.fit)
  
      return sorted(agents[start:end], key=lambda x: x.fit)
  
imports: import copy
  from typing import Any, Dict, List, Optional
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.constant
  import opytimizer.utils.exception
  from opytimizer.core import Optimizer
  from opytimizer.core.agent import Agent
  from opytimizer.core.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 7 for calling the MVPA obj's underlying member method code with example usage: obj._get_agents_from_team(agents, index) and returns: sorted, sorted