def METHOD_NAME(unsafe_string):
    """Return the input as a str, sanitized for insertion into the DOM.
    Arguments:
      unsafe_string: A Unicode string or UTF-8--encoded bytestring
        possibly containing unsafe HTML markup.
    Returns:
      A string containing safe HTML.
    """
    total_null_bytes = 0
    if isinstance(unsafe_string, bytes):
        unsafe_string = unsafe_string.decode("utf-8")
    return _CLEANER_STORE.cleaner.clean(unsafe_string)