def METHOD_NAME(self, method, device):
    """Test circuits with object metadata."""
    backend = self.backend(method=method, device=device)
    metadata = {1: object}
    circuit = QuantumCircuit(1, name="circ0", metadata=metadata.copy())
    result = backend.run(circuit).result()
    self.assertSuccess(result)
    self.assertEqual(result.results[0].header.metadata, metadata)
    self.assertEqual(circuit.metadata, metadata)