def METHOD_NAME(source: str) -> str:
    # Filter out any magic lines (starting with %) if in a Jupyter notebook
    import re
    srclines = map(lambda x: re.sub(r"^\%.*", "", x), source.split("\n"))
    source = "\n".join(srclines)
    return source