def make_legal_path(path):
    """Return `path`, possibly with some character replacements.
    ``[,]`` are replaced with ``_``.
    """
    if '[' in path:
        path = path.replace('[', '_')
        path = path.replace(']', '_')
    return path