def METHOD_NAME(self, x, depth):
    if depth > self.max_depth:
        raise ValueError("Max depth reached")
    ret = copy.deepcopy(x)
    # Handle dictionaries, lits & tuples. Scrub all values
    if isinstance(x, dict):
        for k, v in ret.items():
            if k in self._keys:
                ret[k] = self._replacement
            else:
                ret[k] = self.METHOD_NAME(v, depth + 1)
    if isinstance(x, (list, tuple)):
        for k, v in enumerate(ret):
            ret[k] = self.METHOD_NAME(v, depth + 1)
    # Finished scrubbing
    return ret