def _make_agent_call(self, method, vm, path, addl_args=None):
        """Abstracts out the interaction with the agent xenapi plugin."""
        ret = self._make_plugin_call('agent', method=method, vm=vm,
                path=path, addl_args=addl_args)
        if isinstance(ret, dict):
            return ret
        try:
            return json.loads(ret)
        except __HOLE__:
            instance_id = vm.id
            LOG.error(_('The agent call to %(method)s returned an invalid'
                      ' response: %(ret)r. VM id=%(instance_id)s;'
                      ' path=%(path)s; args=%(addl_args)r') % locals())
            return {'returncode': 'error',
                    'message': 'unable to deserialize response'}
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/virt/xenapi/vmops.py/VMOps._make_agent_call