code: def qfunc_with_scalar_input(model=None):
      """Model dependent quantum function taking a single input"""
  
      def qfunc(x):
          if model == "qubit":
              qml.RX(x, wires=0)
          elif model == "cv":
              qml.Displacement(x, 0.0, wires=0)
          return qml.expval(qml.Identity(wires=0))
  
      return qfunc
  
file_path: pennylane/pennylane/devices/tests/test_properties.py
imports: import pytest
  import pennylane.numpy
  import pennylane
  from pennylane._device import DeviceError
label_desc: Use image node_id 1 for calling a global function with example usage: qfunc_with_scalar_input(model) and returns: qfunc, qml