def __init__(self, first_level, main_memory):
assert isinstance(first_level, Cache),"<STR_LIT>"<EOL>assert isinstance(main_memory, MainMemory),"<STR_LIT>"<EOL>self.first_level = first_level<EOL>for l in self.levels(with_mem=False):  <EOL><INDENT>self.last_level = l<EOL><DEDENT>self.main_memory = main_memory<EOL>
Create interface to interact with cache simulator backend.

:param first_level: first cache level object.
:param main_memory: main memory object.