def METHOD_NAME(
    labeled_data,
    annotations_output_dir,
    images_output_dir,
    label_format="WKT",
):
    """Convert Labelbox JSON export to Pascal VOC format.
    Args:
        labeled_data (str): File path to Labelbox JSON export of label data.
        annotations_output_dir (str): File path of directory to write Pascal VOC
            annotation files.
        images_output_dir (str): File path of directory to write images.
        label_format (str): Format of the labeled data.
            Valid options are: "WKT" and "XY", default is "WKT".
    Todo:
        * Add functionality to allow use of local copy of an image instead of
            downloading it each time.
    """
    # make sure annotation output directory is valid
    try:
        annotations_output_dir = os.path.abspath(annotations_output_dir)
        assert os.path.isdir(annotations_output_dir)
    except AssertionError:
        logging.exception("Annotation output directory does not exist")
        return None
    # read labelbox JSON output
    with open(labeled_data) as f:
        lines = f.readlines()
        label_data = json.loads(lines[0])
    for data in label_data:
        try:
            write_label(
                data["ID"],
                data["Labeled Data"],
                data["Label"],
                label_format,
                images_output_dir,
                annotations_output_dir,
            )
        except requests.exceptions.MissingSchema:
            logging.exception(
                '"Labeled Data" field must be a URL. '
                "Support for local files coming soon",
            )
            continue
        except requests.exceptions.ConnectionError:
            logging.exception(
                "Failed to fetch image from {}".format(data["Labeled Data"]),
            )
            continue