def BreachDepressions(
  dem,
  in_place = False,
  topology = 'D8'
):
  """Breaches all depressions in a DEM.

     Args:
         dem     (rdarray): An elevation model
         in_place (bool):   If True, the DEM is modified in place and there is
                            no return; otherwise, a new, altered DEM is returned.                                     
         topology (string): A topology indicator

     Returns:
         DEM without depressions.
  """
  if type(dem) is not rdarray:
    raise Exception("A richdem.rdarray or numpy.ndarray is required!")

  if topology not in ['D8','D4']:
    raise Exception("Unknown topology!")

  if not in_place:
    dem = dem.copy()

  _AddAnalysis(dem, "BreachDepressions(dem)")

  demw = dem.wrap()

  if topology=='D8':
    _richdem.rdBreachDepressionsD8(demw)
  elif topology=='D4':
    _richdem.rdBreachDepressionsD4(demw)

  dem.copyFromWrapped(demw)

  if not in_place:
    return dem
Breaches all depressions in a DEM.

     Args:
         dem     (rdarray): An elevation model
         in_place (bool):   If True, the DEM is modified in place and there is
                            no return; otherwise, a new, altered DEM is returned.                                     
         topology (string): A topology indicator

     Returns:
         DEM without depressions.