code: def sanitize_report_string(txt: str) -> str:
      
      if len(txt) < 4:
          return txt
      # Standardize whitespace
      txt = ' '.join(txt.split())
      # Prevent changes to station ID
      stid, txt = txt[:4], txt[4:]
      # Replace invalid key-value pairs
      for key, rep in STR_REPL.items():
          txt = txt.replace(key, rep)
      # Check for missing spaces in front of cloud layers
      # Ex: TSFEW004SCT012FEW///CBBKN080
      for cloud in CLOUD_LIST:
          if cloud in txt and ' ' + cloud not in txt:
              start, counter = 0, 0
              while txt.count(cloud) != txt.count(' ' + cloud):
                  cloud_index = start + txt[start:].find(cloud)
                  if len(txt[cloud_index:]) >= 3:
                      target = txt[cloud_index + len(cloud):cloud_index + len(cloud) + 3]
                      if target.isdigit() or not target.strip('/'):
                          txt = txt[:cloud_index] + ' ' + txt[cloud_index:]
                  start = cloud_index + len(cloud) + 1
                  # Prevent infinite loops
                  if counter > txt.count(cloud):
                      break
                  counter += 1
      return stid + txt
docs: Provides sanitization for operations that work better when the report is a string
  
      Returns the first pass sanitized report string