code: def _validate_canonical(self):
      super()._validate_canonical()
  
      assert 0 < self.port < 65536
      assert self.max_trial_number_per_gpu > 0
      utils.validate_gpu_indices(self.gpu_indices)
  
      if self.password is not None:
          warnings.warn(
              "SSH password will be exposed in web UI as plain text. We recommend to use SSH key file."
          )
      elif not Path(self.ssh_key_file).is_file():  # type: ignore
          raise ValueError(
              f'RemoteMachineConfig: You must either provide password or a valid SSH key file "{self.ssh_key_file}"'
          )
  
file_path: nni/nni/experiment/config/training_services/remote.py
imports: from dataclasses import dataclass
  from pathlib import Path
  from typing import List, Optional, Union
  import warnings
  from typing_extensions import Literal
  from ..base import ConfigBase
  from ..training_service import TrainingServiceConfig
  from ..None import utils
label_desc: Use image node_id 2 for calling the RemoteMachineConfig obj's underlying member method code with example usage: obj._validate_canonical() without return types