class_docstr: A base class of objects with multi-device hierarchy.
docstr: Array module corresponding to the device.
  
  Depending on the device in which this object resides, this property
  returns :mod:`numpy`, :mod:`cupy` or :mod:`chainerx`.
docstr_tok: ["Array","module","corresponding","to","the","device",".","Depending","on","the","device","in","which","this","object","resides",",","this","property","returns",":","mod",":","`","numpy","`",",",":","mod",":","`","cupy","`","or",":","mod",":","`","chainerx","`","."]
code: def xp(self) -> types.Xp:
      """Array module corresponding to the device.
  
      Depending on the device in which this object resides, this property
      returns :mod:`numpy`, :mod:`cupy` or :mod:`chainerx`.
  
      """
      device = self.device
      if device is None:
          return None
      return device.xp
  
imports: from __future__ import absolute_import
  import abc
  import sys
  import threading
  import typing
  import warnings
  import numpy
  import chainer
  from chainer import backend
  from chainer.backends import _cpu
  from chainer.backends import cuda
  from chainer.backends import intel64
  from chainer import types
  from chainer import utils
  import chainerx
label_desc: Use image node_id 4 for calling the DeviceResident obj's underlying member method code with example usage: obj.xp() and returns: device, None