code: def get_overload_signature(
      properties,
      indent=" " * 4,
  ):
      kwargs = [
          f"{indent}{indent}{property_name}: Optional[{type_hint}] = None"
          for property_name, type_hint, _ in properties
      ]
      args_str = ", \n".join(kwargs + [f"{indent}{indent}**kwargs"])
      doc_str = "\n".join(
          [
              f"{indent}{indent}:param {property_name}: {description}"
              for property_name, _, description in properties
          ]
          + [
              f"{indent}{indent}:param kwargs: other parameters to be set _after_ the document is constructed"
          ]
      )
  
      signature = f"def __init__(\n{indent}{indent}self,\n{args_str}\n{indent}):"
      final_str = f'@overload\n{indent}{signature}\n{indent}{indent}"""\n{doc_str}\n{indent}{indent}"""'
  
      return final_str
  
file_path: jina/scripts/inject-document-props-as-overload.py
imports: import inspect
  import re
  import warnings
  from operator import itemgetter
  from typing import Optional, Tuple, List
  from jina import Document
label_desc: Use image node_id 2 for calling a global function with example usage: get_overload_signature(properties, indent) and returns: final_str