code: def parse_memory_value(s):
      
      number, unit = split_number_and_unit(s)
      if not unit or unit == 'B':
          return number
      elif unit == 'kB':
          return number * _BYTE_FACTOR
      elif unit == 'MB':
          return number * _BYTE_FACTOR * _BYTE_FACTOR
      elif unit == 'GB':
          return number * _BYTE_FACTOR * _BYTE_FACTOR * _BYTE_FACTOR
      elif unit == 'TB':
          return number * _BYTE_FACTOR * _BYTE_FACTOR * _BYTE_FACTOR * _BYTE_FACTOR
      else:
          raise ValueError('unknown unit: {} (allowed are B, kB, MB, GB, and TB)'.format(unit))
docs: Parse a string that contains a number of bytes, optionally with a unit like MB.
      @return the number of bytes encoded by the string