def get_memory(self, address, amount):
    if (type(address) == str):
        if ('0x' in address):
            address = int(address, 16)
    if (type(amount) == str):
        if ('0x' in amount):
            amount = int(amount, 16)
    if ((address < self.start_address) or (address > (self.start_address + self.allocated_memory))):
        raise IndexError(((((('Address accessed by get_memory() function of Virtual Memory is outside the range of the allocated memory. Address: ' + str(hex(address))) + ', Allocated Memory: ') + str(hex(self.start_address))) + '-') + str(hex((self.start_address + self.allocated_memory)))))
    memory_start = (address - self.start_address)
    return self.memory[memory_start:(memory_start + amount)]
def get_memory(self, address, amount):
    if (type(address) == str):
        if ('0x' in address):
            address = int(address, 16)
    if (type(amount) == str):
        if ('0x' in amount):
            amount = int(amount, 16)
    if ((address < self.start_address) or (address > (self.start_address + self.allocated_memory))):
        raise IndexError(((((('Address accessed by get_memory() function of Virtual Memory is outside the range of the allocated memory. Address: ' + str(hex(address))) + ', Allocated Memory: ') + str(hex(self.start_address))) + '-') + str(hex((self.start_address + self.allocated_memory)))))
    memory_start = (address - self.start_address)
    return self.memory[memory_start:(memory_start + amount)]