def cleanup(py: str) -> str:
    """Remove codeblocks, if present."""
    if py.startswith("```") and py.endswith("```"):

        py = py.strip("```py")
        return py.strip("```")

    elif py.startswith("`") and py.endswith("`"):

        return py.strip("`")

    return py