def__init__(self,fields):processed_fields=dict()fork,vinfields.items():ifisinstance(v,Field):processed_fields[k]=velifisinstance(v,dict):processed_fields[k]=Field(v)else:raiseTypeError(f"Expected Field or dict, got {type(v)}")self.fields=processed_fields
defshow(self,**assignments):""" Interactive visualization of the Pulse Args: **assignments: assigning the instance value (literal) to the existing variables in the Pulse """display_ir(self,assignments)