code: def find(self, start_address, end_address, byte_depth=20, instrs_depth=2):
          
          self._max_bytes = byte_depth
          self._instrs_depth = instrs_depth
  
          if self._architecture == ARCH_X86:
              candidates = self._find_x86_candidates(start_address, end_address)
          elif self._architecture == ARCH_ARM:
              candidates = self._find_arm_candidates(start_address, end_address)
          else:
              raise Exception("Architecture not supported.")
  
          # Sort and return.
          return sorted(candidates, key=lambda g: g.address)
docs: Find gadgets.