code: def compress_query(query: str) -> str:
      query = query.replace("\n", "")
      query = re.sub("\s+", " ", query)
      return query
  
imports: import json
  import subprocess
  import re
  import os
  import base64
  import logging
  from urllib import request, error
  from typing import Dict, Tuple, Any, Optional, List
label_desc: Use image node_id 1 for calling a global function with example usage: compress_query(query) and returns: query