code: def marker_method():
      from ..models import Marker, Scatter
  
      glyphclass = Marker
  
      def decorator(func):
          parameters = glyphclass.parameters()
  
          sigparams = (
              [Parameter("self", Parameter.POSITIONAL_OR_KEYWORD)]
              + [x[0] for x in parameters]
              + [Parameter("kwargs", Parameter.VAR_KEYWORD)]
          )
  
          marker_type = func.__name__
  
          @wraps(func)
          def wrapped(self, *args, **kwargs):
              deprecated(
                  (3, 4, 0),
                  f"{func.__name__}() method",
                  f"scatter(marker={func.__name__!r}, ...) instead",
              )
              if len(args) > len(glyphclass._args):
                  raise TypeError(
                      f"{func.__name__} takes {len(glyphclass._args)} positional argument but {len(args)} were given"
                  )
              for arg, param in zip(args, sigparams[1:]):
                  kwargs[param.name] = arg
              kwargs["marker"] = marker_type
              return create_renderer(Scatter, self, **kwargs)
  
          wrapped.__signature__ = Signature(parameters=sigparams)
          wrapped.__name__ = func.__name__
  
          wrapped.__doc__ = generate_docstring(
              glyphclass, parameters, func.__doc__
          )
  
          return wrapped
  
      return decorator
  
file_path: bokeh/src/bokeh/plotting/_decorators.py
imports: from __future__ import annotations
  import logging
  from functools import wraps
  from inspect import Parameter, Signature
  from ..util.deprecation import deprecated
  from ._docstring import generate_docstring
  from ._renderer import create_renderer
label_desc: Use image node_id 1 for calling a global function with example usage: marker_method() and returns: decorator, wrapped, create_renderer