code: def ingest_memory(self, memory):
          
          def lshift(num, shift):
              return num << shift
  
          def rshift(num, shift):
              return num >> shift
  
          if isinstance(memory, int):
              # Memory was specified as an integer, meaning it is in bytes
              memory = '{}b'.format(memory)
  
          bit_shift = {
              'g': {'func': lshift, 'shift': 30},
              'm': {'func': lshift, 'shift': 20},
              'k': {'func': lshift, 'shift': 10},
              'b': {'func': rshift, 'shift': 0}
          }
          unit = memory[-1]
          number = int(memory[:-1])
          return bit_shift[unit]['func'](number, bit_shift[unit]['shift'])
docs: Transform the memory into bytes
  
          :param memory: Compose memory definition. (1g, 24k)
          :type memory: memory string or integer
          :return: The memory in bytes
          :rtype: int