class_docstr: Ivy Device Class.
class_docstr_tok: ["Ivy","Device","Class","."]
docstr: Enter the runtime context related to the specified device.
  
  Returns
  -------
  ret
      Self, an instance of the same class.
  
  Examples
  --------
  A "cpu" as device:
  
  >>> with ivy.DefaultDevice("cpu") as device:
  >>>     # with block calls device.__enter__()
  >>>     print(device._dev)
  "cpu"
code: def __enter__(self):
      """Enter the runtime context related to the specified device.
  
      Returns
      -------
      ret
          Self, an instance of the same class.
  
      Examples
      --------
      A "cpu" as device:
  
      >>> with ivy.DefaultDevice("cpu") as device:
      >>>     # with block calls device.__enter__()
      >>>     print(device._dev)
      "cpu"
      """
      ivy.set_default_device(self._dev)
      ivy.set_soft_device_mode(True)
      return self
  
imports: import os
  import gc
  import abc
  import math
  import psutil
  import warnings
  import types
  from typing import Type, Optional, Tuple
  from typing import Union, Callable, Iterable, Any
  import ivy
  from ivy.func_wrapper import handle_out_argument, to_native_arrays_and_back, inputs_to_native_arrays, handle_nestable, handle_array_like_without_promotion, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 2 for calling the DefaultDevice obj's underlying member method code with example usage: obj.__enter__() and returns: self