code: def update(self, deltat=1.0):
          '''fly circles, then dive'''
          DNFZ.update(self, deltat)
          self.time_circling += deltat
          self.setheading(self.heading + self.turn_rate * deltat)
          self.move(self.drift_heading, self.drift_speed)
          if self.getalt() > self.max_alt or self.getalt() < self.ground_height():
              if self.getalt() > self.ground_height():
                  self.setclimbrate(self.dive_rate)
              else:
                  self.setclimbrate(self.climb_rate)
          if self.getalt() < self.ground_height():
              self.setalt(self.ground_height())
          if self.distance_from_home() > gen_settings.region_width:
              self.randpos()
              self.randalt(f update(self, deltat=1.0):
          '''fly circles, then dive'''
          DNFZ.update(self, deltat)
          self.time_circling += deltat
          self.setheading(self.heading + self.turn_rate * deltat)
          self.move(self.drift_heading, self.drift_speed)
          if self.getalt() > self.max_alt or self.getalt() < self.ground_height():
              if self.getalt() > self.ground_height():
                  self.setclimbrate(self.dive_rate)
              else:
                  self.setclimbrate(self.climb_rate)
          if self.getalt() < self.ground_height():
              self.setalt(self.ground_height())
          if self.distance_from_home() > gen_settings.region_width:
              self.randpos()
              self.randalt()
docs: fly circles, then dive