parameters: (device_type)
return_statement: return device is not None and device.device_type == device_type.upper()
docstring: Check if the current device is explicitly set on the device type specified.
  
    Arguments:
        device_type: A string containing `GPU` or `CPU` (case-insensitive).
  
    Returns:
        A boolean indicating if the current device scope is explicitly set on the
        device type.
  
    Raises:
        ValueError: If the `device_type` string indicates an unsupported device.
docstring_summary: Check if the current device is explicitly set on the device type specified.
docstring_tokens: Check if the current device is explicitly set on the device type specified .
function: def _is_current_explicit_device(device_type):
    """Check if the current device is explicitly set on the device type specified.
  
    Arguments:
        device_type: A string containing `GPU` or `CPU` (case-insensitive).
  
    Returns:
        A boolean indicating if the current device scope is explicitly set on the
        device type.
  
    Raises:
        ValueError: If the `device_type` string indicates an unsupported device.
    """
    device_type = device_type.upper()
    if device_type not in ['CPU', 'GPU']:
      raise ValueError('`device_type` should be either "CPU" or "GPU".')
    device = _get_current_tf_device()
    return device is not None and device.device_type == device_type.upper()
function_tokens: def _is_current_explicit_device ( device_type ) : device_type = device_type . upper ( ) if device_type not in [ 'CPU' , 'GPU' ] : raise ValueError ( '`device_type` should be either "CPU" or "GPU".' ) device = _get_current_tf_device ( ) return device is not None and device . device_type == device_type . upper ( )