original_docstring: 
          Find the nearby per
  
          Parameters
          ----------
          population : Population
              Population class containing the entire population
          frame : int
              Int value of the current frame
  
          Returns
          -------
          Population
              Updated population class with more infected people
          
docstring: Find the nearby per
  Parameters
  
  population : Population
  Population class containing the entire population
  frame : int
  Int value of the current frame
  
  Returns
  
  Population
  Updated population class with more infected people
docstring_tokens: Find the nearby per Parameters population : Population Population class containing the entire population frame : int Int value of the current frame Returns Population Updated population class with more infected people
code: def infect(self, population: Population, frame: int) -> Population:
          """
          Find the nearby per
  
          Parameters
          ----------
          population : Population
              Population class containing the entire population
          frame : int
              Int value of the current frame
  
          Returns
          -------
          Population
              Updated population class with more infected people
          """
          # Get the index of all the people who were infected in the previous
          # step.
          infected_idx = population.get_all_infected()
          persons = population.get_person()
  
          infected_counter = 0
          for idx in infected_idx:
              infected_counter += 1
              if population.get_time_infected(int(idx[0]), frame) >= \
                      self.recovery_time:
                  population = self.die_or_immune(population, int(idx[0]))
  
              x_bounds = [persons[int(idx[0])][index.x_axis] -
                          math.sqrt(self.infection_range),
                          persons[int(idx[0])][index.x_axis] +
                          math.sqrt(self.infection_range)]
              y_bounds = [persons[int(idx[0])][index.y_axis] -
                          math.sqrt(self.infection_range),
                          persons[int(idx[0])][index.y_axis] +
                          math.sqrt(self.infection_range)]
  
              tmp = self.find_nearby(persons, x_bounds, y_bounds)
              for i in tmp:
                  chance = np.random.uniform(low=0.0001, high=1)
                  if chance < persons[int(i)][index.susceptibility] and \
                          persons[int(idx[0])][index.g_value] > 0:
                      population.persons[int(i)][9] = 1
                      population.persons[int(i)][index.infected_by] = idx[0]
                      population.set_infected_at(int(i), frame)
                      population.persons[int(idx[0])][index.g_value] -= 1
                      if(len(population.persons[population
                             .persons[:, index.hospitalized] == 1]) <
                         self.total_healthcare_capacity):
                          population.persons[int(i)][index.hospitalized] = 1
          return population
code_tokens: def infect ( self , population : Population , frame : int ) -> Population : infected_idx = population . get_all_infected ( ) persons = population . get_person ( ) infected_counter = 0 for idx in infected_idx : infected_counter += 1 if population . get_time_infected ( int ( idx [ 0 ] ) , frame ) >= self . recovery_time : population = self . die_or_immune ( population , int ( idx [ 0 ] ) ) x_bounds = [ persons [ int ( idx [ 0 ] ) ] [ index . x_axis ] - math . sqrt ( self . infection_range ) , persons [ int ( idx [ 0 ] ) ] [ index . x_axis ] + math . sqrt ( self . infection_range ) ] y_bounds = [ persons [ int ( idx [ 0 ] ) ] [ index . y_axis ] - math . sqrt ( self . infection_range ) , persons [ int ( idx [ 0 ] ) ] [ index . y_axis ] + math . sqrt ( self . infection_range ) ] tmp = self . find_nearby ( persons , x_bounds , y_bounds ) for i in tmp : chance = np . random . uniform ( low = 0.0001 , high = 1 ) if chance < persons [ int ( i ) ] [ index . susceptibility ] and persons [ int ( idx [ 0 ] ) ] [ index . g_value ] > 0 : population . persons [ int ( i ) ] [ 9 ] = 1 population . persons [ int ( i ) ] [ index . infected_by ] = idx [ 0 ] population . set_infected_at ( int ( i ) , frame ) population . persons [ int ( idx [ 0 ] ) ] [ index . g_value ] -= 1 if ( len ( population . persons [ population . persons [ : , index . hospitalized ] == 1 ] ) < self . total_healthcare_capacity ) : population . persons [ int ( i ) ] [ index . hospitalized ] = 1 return population
short_docstring: Find the nearby per
  Parameters
short_docstring_tokens: Find the nearby per Parameters
comment: """
          Find the nearby per
  
          Parameters
          ----------
          population : Population
              Population class containing the entire population
          frame : int
              Int value of the current frame
  
          Returns
          -------
          Population
              Updated population class with more infected people
          """$SEP$# Get the index of all the people who were infected in the previous$SEP$# step.