code: def swish(x, beta):
      """Swish activation function.
  
      .. math:: f(x, \\beta) = x \\cdot \\sigma(\\beta x),
  
      where :math:`\\sigma(\\cdot)` is the sigmoid function. It has the
      following properties:
  
      .. math::
          f(x, 0) &= \\frac{x}{2}, \\\\
          \\lim_{\\beta \\to \\infty} f(x, \\beta) &= \\max(0, x).
  
      Args:
          x (:class:`~chainer.Variable` or :ref:`ndarray`): Input variable of
              shape :math:`(s_B, s_1, s_2, ..., s_N)`, where :math:`s_B` is
              assumed to be the *minibatch dimension*.
          beta (:class:`~chainer.Variable` or :ref:`ndarray`): Parameter variable
              :math:`\\beta` of shape :math:`(s_1, s_2, ..., s_M)`, where
              :math:`M` is an arbitrary integer between
              :math:`0 \\leq M \\leq N`. The number of dimensions of ``beta``
              will be matched with ``x`` by reshaping it as
              :math:`(1, s_1, ..., s_M, 1, ... 1)`, then ``beta`` and ``x``
              are multiplied together in an element-wise manner.
  
      Returns:
          ~chainer.Variable: Output variable of the same shape as ``x``.
  
      .. warning::
          :math:`\\beta` is a trainable parameter in the original paper
          (https://arxiv.org/abs/1710.05941). To train :math:`\\beta`, use
          :class:`chainer.links.Swish` instead.
  
      .. seealso::
          :class:`chainer.links.Swish` to manage the model parameter ``beta``.
  
      """
      (y,) = Swish().apply((x, beta))
      return y
  
imports: import numpy
  import chainer
  from chainer.backends import cuda
  from chainer import function_node
  from chainer import utils
  from chainer.utils import type_check
label_desc: Use image node_id 4 for calling a global function with example usage: swish(x, beta) and returns: y