Patches the config with the given overrides.

        Example:

        If the current dictionary looks like this:
        a: 1,
        b: {
            c: 3,
            d: 4
        }

        and `patch` is called with the following overrides:
        b: {
            d: 2,
            e: 4
        },
        c: 5

        then, the following will be the resulting dictionary:
        a: 1,
        b: {
            c: 3,
            d: 2,
            e: 4
        },
        c: 5

def patch(self, overrides):
        """
        Patches the config with the given overrides.

        Example:

        If the current dictionary looks like this:
        a: 1,
        b: {
            c: 3,
            d: 4
        }

        and `patch` is called with the following overrides:
        b: {
            d: 2,
            e: 4
        },
        c: 5

        then, the following will be the resulting dictionary:
        a: 1,
        b: {
            c: 3,
            d: 2,
            e: 4
        },
        c: 5

        """
        overrides = overrides or {}
        for key, value in iteritems(overrides):
            current = self.get(key)
            if isinstance(value, dict) and isinstance(current, dict):
                current.patch(value)
            else:
                self[key] = value