def create_labelbox_annotation_project(
    video_paths,
    lb_dataset_name,
    lb_project_name,
    lb_api_key,
    lb_ontology=None,
    lb_batch_priority=5,
    data_upload_strategy="fail",
    lb_batches_name=None,
    lb_iam_integration_id="DEFAULT",
    lb_global_key_generator=lambda x: str(uuid.uuid4()),
):
    """
    Creates labelbox dataset for video annotation and sets up corresponding Labelbox project.

    Args:
       video_paths (List[str]): List of paths to video files to be processed can be either all local or all pre-signed remote.
       lb_dataset_name (str): Name for Labelbox dataset.
       lb_project_name (str): Name for Labelbox project.
       lb_api_key (str): Labelbox API key for authentication.
       lb_ontology (Ontology, optional): Labelbox ontology to connect to project. Defaults to None
       lb_batch_priority (int, optional): Priority for Labelbox batches. Defaults to 5
       data_upload_strategy (str, optional): Strategy for uploading data to Labelbox. Can be 'fail', 'skip', or 'all'. Defaults to 'fail'
       lb_batches_name (str, optional): Name for Labelbox batches. Defaults to None. If None, will use lb_dataset_name + '_batch-'
       lb_iam_integration_id (str, optional): IAM integration id for Labelbox. Defaults to 'DEFAULT'
       lb_global_key_generator (callable, optional): Function to generate global keys for data rows. Defaults to lambda x: str(uuid.uuid4())
    """

    import labelbox as lb  # type: ignore

    lb_client = lb.Client(api_key=lb_api_key)

    video_paths = filter_video_paths_(video_paths, data_upload_strategy)

    assets = video_paths

    # validate paths
    all_local = [os.path.exists(p) for p in video_paths]
    if any(all_local) and not all(all_local):
        raise Exception(f"video paths must be all local or all remote: {video_paths}")

    if len(all_local):
        if not all_local[0]:
            assets = [
                {
                    "row_data": p,
                    "global_key": lb_global_key_generator(p),
                    "media_type": "VIDEO",
                    "metadata_fields": [],
                    "attachments": [],
                }
                for p in video_paths
            ]

    if lb_iam_integration_id and lb_iam_integration_id != "DEFAULT":
        lb_org = lb_client.get_organization()
        integrations = lb_org.get_iam_integrations()
        tmp_integration = None
        for integration in integrations:
            if integration.uid == lb_iam_integration_id:
                tmp_integration = integration
                break
        if tmp_integration is None:
            raise Exception(f"iam integration {lb_iam_integration_id} not found")
        lb_iam_integration = tmp_integration
    else:
        lb_iam_integration = lb_iam_integration_id

    print(
        "uploading videos to labelbox",
        (
            f"using iam integration: {lb_iam_integration}"
            if lb_iam_integration != "DEFAULT"
            else ""
        ),
    )

    lb_ds = lb_client.create_dataset(
        iam_integration=lb_iam_integration, name=lb_dataset_name
    )
    task = lb_ds.create_data_rows(assets)
    task.wait_till_done()

    if task.errors:
        raise Exception(f"failed to upload videos to labelbox: {task.errors}")

    if len(all_local):
        if all_local[0]:
            print("assigning global keys to data rows")
            rows = [
                {
                    "data_row_id": lb_ds.data_row_for_external_id(p).uid,
                    "global_key": str(uuid.uuid4()),
                }
                for p in video_paths
            ]
            res = lb_client.assign_global_keys_to_data_rows(rows)
            if res["status"] != "SUCCESS":
                raise Exception(f"failed to assign global keys to data rows: {res}")

    print("successfuly uploaded videos to labelbox")

    # Create a new project
    project = lb_client.create_project(
        name=lb_project_name, media_type=lb.MediaType.Video
    )

    if lb_batches_name is None:
        lb_batches_name = lb_dataset_name + "_batch-"

    task = project.create_batches_from_dataset(
        name_prefix=lb_batches_name, dataset_id=lb_ds.uid, priority=lb_batch_priority
    )

    if task.errors():
        raise Exception(f"Error creating batches: {task.errors()}")

    if lb_ontology:
        project.connect_ontology(lb_ontology)

    Creates labelbox dataset for video annotation and sets up corresponding Labelbox project.

    Args:
       video_paths (List[str]): List of paths to video files to be processed can be either all local or all pre-signed remote.
       lb_dataset_name (str): Name for Labelbox dataset.
       lb_project_name (str): Name for Labelbox project.
       lb_api_key (str): Labelbox API key for authentication.
       lb_ontology (Ontology, optional): Labelbox ontology to connect to project. Defaults to None
       lb_batch_priority (int, optional): Priority for Labelbox batches. Defaults to 5
       data_upload_strategy (str, optional): Strategy for uploading data to Labelbox. Can be 'fail', 'skip', or 'all'. Defaults to 'fail'
       lb_batches_name (str, optional): Name for Labelbox batches. Defaults to None. If None, will use lb_dataset_name + '_batch-'
       lb_iam_integration_id (str, optional): IAM integration id for Labelbox. Defaults to 'DEFAULT'
       lb_global_key_generator (callable, optional): Function to generate global keys for data rows. Defaults to lambda x: str(uuid.uuid4())
    
python/deeplake/integrations/labelbox/labelbox_.py