docs: def convert_to_mb(s):
      """Convert memory size from GB to MB."""
      s = s.upper()
      try:
          if s.endswith('G'):
              return float(s[:-1].strip()) * 1024
          elif s.endswith('T'):
              return float(s[:-1].strip()) * 1024 * 1024
          else:
              return float(s[:-1].strip())
      except (IndexError, ValueError, KeyError, TypeError):
          errmsg = ("Invalid memory format: %s") % s
          raise exception.SDKInternalError(msg=errmsg)