def _validate_metadata(self, metadata):
        """Ensure that we can work with the metadata given."""
        try:
            six.iteritems(metadata)
        except __HOLE__:
            msg = _("Unable to parse metadata key/value pairs.")
            LOG.debug(msg)
            raise exc.HTTPBadRequest(explanation=msg)
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/legacy_v2/servers.py/Controller._validate_metadata