code: def _convert_to_args(sig, args, kwargs):
      """
      Given the signature of a function, convert the positional and
      keyword arguments to purely positional arguments.
      """
      new_args = []
      for i, param in enumerate(sig):
          if param in kwargs:
              # first check if the name is provided in the keyword arguments
              new_args.append(kwargs[param])
          else:
              # if not, then the argument must be positional
              new_args.append(args[i])
  
      return tuple(new_args)
  
imports: import functools
  import inspect
  import pennylane
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_to_args(sig, args, kwargs) and returns: tuple