code: def auto_init_default(column):
      
      if isinstance(column, ColumnProperty):
          default = column.columns[0].default
      else:
          default = column.default
  
      @event.listens_for(column, 'init_scalar', retval=True, propagate=True)
      def init_scalar(target, value, dict_):
          # A subclass may override the column and not provide a default. Watch out for that.
          if default:
              if default.is_callable:
                  value = default.arg(None)
              elif default.is_scalar:
                  value = default.arg
              else:
                  raise NotImplementedError("Can't invoke pre-default for a SQL-level column default")
              dict_[column.key] = value
              return value
docs: Set the default value for a column when it's first accessed rather than
      first committed to the database.