code: def test_string_type_annotation(self):
      def func(col: "pd.Series") -> "pd.Series":
          pass
  
      self.assertEqual(
          infer_eval_type(signature(func), get_type_hints(func)),
          PandasUDFType.SCALAR,
      )
  
      def func(
          col: "pd.DataFrame", col1: "pd.Series"
      ) -> "pd.DataFrame":
          pass
  
      self.assertEqual(
          infer_eval_type(signature(func), get_type_hints(func)),
          PandasUDFType.SCALAR,
      )
  
      def func(col: "pd.DataFrame", *args: "pd.Series") -> "pd.Series":
          pass
  
      self.assertEqual(
          infer_eval_type(signature(func), get_type_hints(func)),
          PandasUDFType.SCALAR,
      )
  
      def func(
          col: "pd.Series", *args: "pd.Series", **kwargs: "pd.DataFrame"
      ) -> "pd.Series":
          pass
  
      self.assertEqual(
          infer_eval_type(signature(func), get_type_hints(func)),
          PandasUDFType.SCALAR,
      )
  
      def func(
          col: "pd.Series", *, col2: "pd.DataFrame"
      ) -> "pd.DataFrame":
          pass
  
      self.assertEqual(
          infer_eval_type(signature(func), get_type_hints(func)),
          PandasUDFType.SCALAR,
      )
  
      def func(
          col: Union["pd.Series", "pd.DataFrame"],
          *,
          col2: "pd.DataFrame",
      ) -> "pd.Series":
          pass
  
      self.assertEqual(
          infer_eval_type(signature(func), get_type_hints(func)),
          PandasUDFType.SCALAR,
      )
  
      def func(
          col: "Union[pd.Series, pd.DataFrame]", *, col2: "pd.DataFrame"
      ) -> "pd.Series":
          pass
  
      self.assertEqual(
          infer_eval_type(signature(func), get_type_hints(func)),
          PandasUDFType.SCALAR,
      )
  
imports: import sys
  import unittest
  from inspect import signature
  from typing import Union, Iterator, Tuple, cast, get_type_hints
  from pyspark.sql.functions import mean, lit
  from pyspark.testing.sqlutils import ReusedSQLTestCase, have_pandas, have_pyarrow, pandas_requirement_message, pyarrow_requirement_message
  from pyspark.sql.pandas.typehints import infer_eval_type
  from pyspark.sql.pandas.functions import pandas_udf, PandasUDFType
  from pyspark.sql import Row
label_desc: Use image node_id 12 for calling the PandasUDFTypeHintsTests obj's underlying member method code with example usage: obj.test_string_type_annotation() without return types