code: def create_delinq_features(table, **kwargs):
      chronometer = Chronometer.makeStarted()
      query = """
          SELECT loan_id,
              min(monthly_reporting_period) as delinquency_30
          FROM main.perf
          where current_loan_delinquency_status >= 1 group by loan_id"""
      result_delinq_30 = pyblazing.run_query(
          query, {table.name: table.columns}
      )
  
      query = """
          SELECT loan_id,
              min(monthly_reporting_period) as delinquency_90
          FROM main.perf
          where current_loan_delinquency_status >= 3 group by loan_id"""
      result_delinq_90 = pyblazing.run_query(
          query, {table.name: table.columns}
      )
  
      query = """
          SELECT loan_id,
              min(monthly_reporting_period) as delinquency_180
          FROM main.perf
          where current_loan_delinquency_status >= 6 group by loan_id
      """
      result_delinq_180 = pyblazing.run_query(
          query, {table.name: table.columns}
      )
  
      new_tables = {
          "delinq_30": result_delinq_30.columns,
          "delinq_90": result_delinq_90.columns,
          "delinq_180": result_delinq_180.columns,
      }
      query = """
          SELECT d30.loan_id, delinquency_30,
              COALESCE(delinquency_90, DATE '1970-01-01') as delinquency_90,
              COALESCE(delinquency_180, DATE '1970-01-01') as delinquency_180
          FROM main.delinq_30 as d30
          LEFT OUTER JOIN main.delinq_90 as d90 ON d30.loan_id = d90.loan_id
          LEFT OUTER JOIN main.delinq_180 as d180 ON d30.loan_id = d180.loan_id
      """
      result_merge = pyblazing.run_query(query, new_tables)
      Chronometer.show(chronometer, "Create deliquency features")
      return result_merge
  
imports: import time
  import pandas
  import pyblazing
  from pyblazing import DriverType, FileSystemType
  from sklearn.model_selection import train_test_split
  import xgboost
  from Configuration import Settings
  from DataBase import createSchema
  from DemoTest.chronometer import Chronometer
  from Utils import Execution
label_desc: Use image node_id 9 for calling a global function with example usage: create_delinq_features(table) and returns: result_merge