code: def modf(arg, stream=None):
      """Return a tuple `(fracpart, intpart)` of arrays containing the
      integer and fractional parts of `arg`.
      """
      if not arg.flags.forc:
          raise RuntimeError(
              "only contiguous arrays may "
              "be used as arguments to this operation"
          )
  
      intpart = gpuarray.GPUArray(arg.shape, arg.dtype)
      fracpart = gpuarray.GPUArray(arg.shape, arg.dtype)
  
      func = elementwise.get_modf_kernel()
      func.prepared_async_call(
          arg._grid,
          arg._block,
          stream,
          arg.gpudata,
          intpart.gpudata,
          fracpart.gpudata,
          arg.mem_size,
      )
  
      return fracpart, intpart
  
file_path: pycuda/pycuda/cumath.py
imports: import pycuda.gpuarray
  import pycuda.elementwise
  import numpy
  import warnings
  from pycuda.driver import Stream
label_desc: Use image node_id 5 for calling a global function with example usage: modf(arg, stream) and returns: fracpart,  intpart