title: How can I optimize this piece of code further?
body: <p>Is it possible to use any loop optimization technique here to reduce the execution time in any way?</p>
  
  <pre><code>def get_destructors_in_radius(self, game_state, location, player_index=1):
      radius_locations = self.radius_locations_3(location)
      destructors = []
      for location2 in radius_locations:
          if location2 in self.all_locations:        
              unit = game_state.contains_stationary_unit(location2)
              if unit:
                  if unit.unit_type == DESTRUCTOR and not unit.player_index == player_index:
                      destructors.append(unit)
  
      return destructors
  </code></pre>