<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_replace_state_separator(data, old, new):
 """Replace state separator. Parameters data : `dict` of `dict` of ([`int`, `str`] or [`list` of `int`, `list` of `str`]) Data. old : `str` Old separator. new : `str` New separator. """

        for key, dataset in data.items():
            data[key] = dict(
                (k.replace(old, new), v)
                for k, v in dataset.items()
            )