code: def parseMemory(memAttribute):
      
      mem = memAttribute.replace(',', '').split()
      if mem[1] == 'GiB':
          return float(mem[0])
      else:
          raise RuntimeError('EC2 JSON format has likely changed.  Error parsing memory.')
docs: Returns EC2 'memory' string as a float.
  
      Format should always be '#' GiB (example: '244 GiB' or '1,952 GiB').
      Amazon loves to put commas in their numbers, so we have to accommodate that.
      If the syntax ever changes, this will raise.
  
      :param memAttribute: EC2 JSON memory param string.
      :return: A float representing memory in GiB.