def METHOD_NAME(text):
    """
    Get markdown, and returns HTML.
    This function is thread-safe
    """
    # we need parsing to be thread safe because
    # L numbering, and Markdown() has internal global variables
    # for explanation about Lock context manager usage
    # see https://docs.python.org/3/library/threading.html
    # on paragraph 17.1.10 (with statement)
    with _parser_lock:
        parser = _get_markdown_parser()
        cleaner = _get_cleaner()
        # reset parser state. Otherwise, internals parser cache grows
        # indefinitely, and performance decreases over time
        parser.reset()
        try:
            text = parser.convert(text)
            # we keep clean function into thread safe part,
            # because we are not sure of this function
            text = cleaner.clean(text=text)
        except Exception as e:
            logger.exception("While parsing markdown", exc_info=e)
            text = _PARSER_EXCEPTION_MESSAGE
    text = text.replace(_iframe_secret_tag, "iframe")
    return text