def assign_query_to_vector_job(
        q: BulkSearchQueryEntity, jobs: Dict[JHash, VectorisedJobs],
        grouped_content: QueryContentCollector,
        index_info: MarqoIndex, device: str) -> List[VectorisedJobPointer]:
    """
    For a individual query, assign its content (to be vectorised) to a vector job. If none exist with the correct
    specifications, create a new job.

    Mutates entries in, and adds values to, the `jobs` param.

    Args:
        q:
        jobs:
        grouped_content: a 2-tuple of content, belonging to a single query, the first element is a list of text content.
            The second is a list of image URLs. Either element can be an empty list
        index_info:
        device:

    Returns:
        A list of pointers to the location in a vector job that will have its vectorised content.
    """
    ptrs = []
    content_lists_by_modality = [
        grouped_content.text_queries,
        grouped_content.image_queries,
        grouped_content.audio_queries,
        grouped_content.video_queries,
    ]

    for i, list_of_queries_by_modalities in enumerate(content_lists_by_modality):
        if len(list_of_queries_by_modalities) > 0:
            content: List[str] = [query.content for query in list_of_queries_by_modalities]
            modality: Modality = list_of_queries_by_modalities[0].modality
            vector_job = VectorisedJobs(
                model_name=index_info.model.name,
                model_properties=index_info.model.get_properties(),
                content=content,
                device=device,
                normalize_embeddings=index_info.normalize_embeddings,
                media_download_headers=q.mediaDownloadHeaders,
                model_auth=q.modelAuth,
                modality=modality
            )
            # If exists, add content to vector job. Otherwise create new
            if jobs.get(vector_job.groupby_key()) is not None:
                j = jobs.get(vector_job.groupby_key())
                ptrs.append(j.add_content(content))
            else:
                jobs[vector_job.groupby_key()] = vector_job
                ptrs.append(VectorisedJobPointer(
                    job_hash=vector_job.groupby_key(),
                    start_idx=0,
                    end_idx=len(vector_job.content)
                ))
    return ptrs

    For a individual query, assign its content (to be vectorised) to a vector job. If none exist with the correct
    specifications, create a new job.

    Mutates entries in, and adds values to, the `jobs` param.

    Args:
        q:
        jobs:
        grouped_content: a 2-tuple of content, belonging to a single query, the first element is a list of text content.
            The second is a list of image URLs. Either element can be an empty list
        index_info:
        device:

    Returns:
        A list of pointers to the location in a vector job that will have its vectorised content.
    
src/marqo/tensor_search/tensor_search.py