def _remove_chars_py3(x_str, del_chars):
    """Utility to remove specified characters from string.

    Parameters
    ----------
    x_str : str
        Generic input string.
    del_chars : str
        String containing characters we would like to remove.

    Returns
    -------
    x_str : str
        Generic input string after removing characters in `del_chars`.
    """
    translator = str.maketrans("", "", del_chars)
    x_str = x_str.translate(translator)
    return x_str