code: def convolve1d3o(
      in1,
      in2,
      mode="valid",
      method="direct",
  ):
      """
      Convolve a 1-dimensional array with a 3rd order filter.
      This results in a second order convolution.
  
      Convolve `in1` and `in2`, with the output size determined by the
      `mode` argument.
  
      Parameters
      ----------
      in1 : array_like
          First input.
      in2 : array_like
          Second input. Should have the same number of dimensions as `in1`.
      mode : str {'full', 'valid', 'same'}, optional
          A string indicating the size of the output:
  
          ``full``
             The output is the full discrete linear convolution
             of the inputs. (Default)
          ``valid``
             The output consists only of those elements that do not
             rely on the zero-padding. In 'valid' mode, either `in1` or `in2`
             must be at least as large as the other in every dimension.
          ``same``
             The output is the same size as `in1`, centered
             with respect to the 'full' output.
      method : str {'auto', 'direct', 'fft'}, optional
          A string indicating which method to use to calculate the convolution.
  
          ``direct``
             The convolution is determined directly from sums, the definition of
             convolution.
          ``fft``
             The Fourier Transform is used to perform the convolution by calling
             `fftconvolve`.
          ``auto``
             Automatically chooses direct or Fourier method based on an estimate
             of which is faster (default).
  
      Returns
      -------
      out : ndarray
          A 1-dimensional array containing a subset of the discrete linear
          convolution of `in1` with `in2`.
  
      See Also
      --------
      convolve
      convolve1d2o
      convolve1d3o
  
      Examples
      --------
      Convolution of a 3rd order filter on a 1d signal
  
      >>> import cusignal as cs
      >>> import numpy as np
      >>> d = 50
      >>> a = np.random.uniform(-1,1,(200))
      >>> b = np.random.uniform(-1,1,(d,d,d))
      >>> c = cs.convolve1d3o(a,b)
  
      """
  
      signal = cp.asarray(in1)
      kernel = cp.asarray(in2)
  
      if mode == "valid" and signal.shape[0] < kernel.shape[0]:
          # Convolution is commutative
          # order doesn't have any effect on output
          signal, kernel = kernel, signal
  
      if mode in ["same", "full"]:
          raise NotImplementedError(
              "Mode == {} not implemented".format(mode)
          )
  
      if method == "direct":
          return _convolution_cuda._convolve1d3o(signal, kernel, mode)
      else:
          raise NotImplementedError("Only Direct method implemented")
  
file_path: cusignal/python/cusignal/convolution/convolve.py
imports: import sys
  import cupy
  import numpy
  from ..utils.fftpack_helper import _init_nd_shape_and_axes_sorted, next_fast_len
  from .None import _convolution_cuda
  from .convolution_utils import _centered, _fftconv_faster, _inputs_swap_needed, _numeric_arrays, _timeit_fast
label_desc: Use image node_id 6 for calling a global function with example usage: convolve1d3o(in1, in2, mode, method) and returns: _convolution_cuda