code: def skip_before_postgres(*ver):
      """Skip a test on PostgreSQL before a certain version."""
      reason = None
      if isinstance(ver[-1], str):
          ver, reason = ver[:-1], ver[-1]
  
      ver = ver + (0,) * (3 - len(ver))
  
      @decorate_all_tests
      def skip_before_postgres_(f):
          @wraps(f)
          def skip_before_postgres__(self):
              if self.conn.info.server_version < int(
                  "%d%02d%02d" % ver
              ):
                  return self.skipTest(
                      reason
                      or "skipped because PostgreSQL %s"
                      % self.conn.info.server_version
                  )
              else:
                  return f(self)
  
          return skip_before_postgres__
  
      return skip_before_postgres_
  
imports: import re
  import os
  import sys
  import types
  import ctypes
  import select
  import operator
  import platform
  import unittest
  from functools import wraps
  from ctypes.util import find_library
  from io import StringIO
  from io import TextIOBase
  from importlib import reload
  import psycopg2
  import psycopg2.errors
  import psycopg2.extensions
  from .testconfig import green, dsn, repl_dsn
label_desc: Use image node_id 5 for calling a global function with example usage: skip_before_postgres() and returns: skip_before_postgres_, skip_before_postgres__, self, f