code: def create_omero_gateway(
      host=DEFAULT_OMERO_HOST,
      port=DEFAULT_OMERO_PORT,
      username=DEFAULT_OMERO_USERNAME,
      password=DEFAULT_OMERO_PASSWORD,
  ):
      """Connect to an omero server and create an omero gateway instance"""
      try:
          omero_client = omero.client(host, port)
          omero_session = omero_client.createSession(username, password)
          omero_gateway = omero_session.createGateway()
      except Exception as err:
          raise RuntimeError(
              "Unable to connect to OMERO server %s@%s:%d"
              % (username, host, int(port)),
              err,
          )
      return omero_client, omero_session, omero_gateway
  
imports: import traceback
  import numpy
  import wx
  import cellprofiler_core.image
  import cellprofiler_core.module
  import cellprofiler_core.measurement
  import cellprofiler_core.preferences
  import cellprofiler_core.setting
  from cellprofiler_core.modules import default_cpimage_name
  import omero
  from omero.rtypes import rlong
  from omero.rtypes import rint
  from omero_version import omero_version
label_desc: Use image node_id 1 for calling a global function with example usage: create_omero_gateway(host, port, username, password) and returns: omero_client,  omero_session,  omero_gateway