class_docstr: An EHO class, inherited from Optimizer.
  
  This is the designed class to define EHO-related
  variables and methods.
  
  References:
      G.-G. Wang, S. Deb and L. Coelho. Elephant Herding Optimization.
      International Symposium on Computational and Business Intelligence (2015).
class_docstr_tok: ["An","EHO","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","EHO-related","variables","and","methods",".","References",":","G.-G.","Wang",",","S.","Deb","and","L.","Coelho",".","Elephant","Herding","Optimization",".","International","Symposium","on","Computational","and","Business","Intelligence","(","2015",")","."]
docstr: Gets a set of agents from a specified clan.
  
  Args:
      agents: List of agents.
      index: Index of clan.
  
  Returns:
      (List[Agent]): A sorted list of agents that belongs to the specified clan.
docstr_tok: ["Gets","a","set","of","agents","from","a","specified","clan",".","Args",":","agents",":","List","of","agents",".","index",":","Index","of","clan",".","Returns",":","(","List","[","Agent","]",")",":","A","sorted","list","of","agents","that","belongs","to","the","specified","clan","."]
code: def _get_agents_from_clan(
      self, agents: List[Agent], index: int
  ) -> List[Agent]:
      """Gets a set of agents from a specified clan.
  
      Args:
          agents: List of agents.
          index: Index of clan.
  
      Returns:
          (List[Agent]): A sorted list of agents that belongs to the specified clan.
  
      """
  
      start, end = index * self.n_ci, (index + 1) * self.n_ci
  
      if (index + 1) == self.n_clans:
          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.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 11 for calling the EHO obj's underlying member method code with example usage: obj._get_agents_from_clan(agents, index) and returns: sorted, sorted