code: def test_infer_encoding_types(channels):
      expected = {
          "x": channels.X("xval"),
          "y": channels.YValue("yval"),
          "strokeWidth": channels.StrokeWidthValue(value=4),
      }
  
      # All positional args
      args, kwds = _getargs(
          channels.X("xval"),
          channels.YValue("yval"),
          channels.StrokeWidthValue(4),
      )
      assert infer_encoding_types(args, kwds, channels) == expected
  
      # All keyword args
      args, kwds = _getargs(
          x="xval", y=alt.value("yval"), strokeWidth=alt.value(4)
      )
      assert infer_encoding_types(args, kwds, channels) == expected
  
      # Mixed positional & keyword
      args, kwds = _getargs(
          channels.X("xval"),
          channels.YValue("yval"),
          strokeWidth=alt.value(4),
      )
      assert infer_encoding_types(args, kwds, channels) == expected
  
imports: import types
  from packaging.version import Version
  from importlib.metadata import version
  import numpy
  import pandas
  import pytest
  import altair
  from altair.utils.core import parse_shorthand, update_nested, infer_encoding_types
  from altair.utils.core import infer_dtype
label_desc: Use image node_id 12 for calling a global function with example usage: test_infer_encoding_types(channels) without return types