code: def test_invalid_singleton_batch_combination():
      with pytest.raises(Exception):
  
          class Invalid1(Executor):
              @requests
              def foo(
                  self, doc: ImageDoc, **kwargs
              ) -> DocList[ImageDoc]:
                  pass
  
      with pytest.raises(Exception):
  
          class Invalid2(Executor):
              @requests
              async def foo(
                  self, doc: ImageDoc, **kwargs
              ) -> DocList[ImageDoc]:
                  pass
  
      with pytest.raises(Exception):
  
          class Invalid3(Executor):
              @requests
              async def foo(
                  self, doc: ImageDoc, **kwargs
              ) -> DocList[ImageDoc]:
                  for _ in range(10):
                      yield doc
  
      with pytest.raises(Exception):
  
          class Invalid4(Executor):
              @requests
              def foo(
                  self, docs: DocList[ImageDoc], **kwargs
              ) -> ImageDoc:
                  pass
  
      with pytest.raises(Exception):
  
          class Invalid6(Executor):
              @requests
              async def foo(
                  self, docs: DocList[ImageDoc], **kwargs
              ) -> ImageDoc:
                  pass
  
file_path: jina/tests/integration/docarray_v2/test_singleton.py
imports: import pytest
  from jina import Flow, Executor, Deployment, requests, Client
  from docarray import BaseDoc, DocList
  from docarray.documents import TextDoc, ImageDoc
  from jina.helper import random_port
  from jina.excepts import RuntimeFailToStart
  import asyncio
label_desc: Use image node_id 7 for calling a global function with example usage: test_invalid_singleton_batch_combination() without return types