def METHOD_NAME(self, command):
    result = None
    try:
        if self.ssh_password is not None:
            self._ssh_client.connect(
                self.public_ip_address, username=self.ssh_user,
                password=self.ssh_password, port=int(self.ssh_port))
        else:
            self._ssh_client.connect(
                self.public_ip_address, username=self.ssh_user,
                key_filename=self.ssh_key_path, port=int(self.ssh_port))
        result = self._ssh_client.exec_command(command)
        if result and len(result) == 3 and result[1].readable():
            result = [str(result[1].read(), 'utf-8'),
                      str(result[2].read(), 'utf-8')]
    finally:
        self._ssh_client.close()
    return result