// SOFTWARE LICENSE AGREEMENT
// This Software License Agreement ("Agreement") is made and entered into as of the Effective Date by and between Discrete Wave, and the licensee ("Licensee").
// 
// 1. GRANT OF LICENSE
// 1.1 License Grant
// The Licensor grants the Licensee a non-exclusive, non-transferable, non-sublicensable, and revocable license to use the software ("Software") in object code form only, strictly in accordance with the terms of this Agreement.
// 
// 1.2 Restrictions
// The Licensee shall not, directly or indirectly:
// (a) Modify, adapt, translate, reverse-engineer, decompile, disassemble, or create derivative works of the Software.
// (b) Remove or alter any copyright, trademark, or proprietary notices in the Software.
// (c) Use the Software in any manner that allows circumvention of licensing restrictions.
// (d) Sell, sublicense, distribute, rent, lease, or assign the Software to any third party.
// (e) Use the Software for any purpose not explicitly authorized in this Agreement.
// 
// 2. OWNERSHIP & INTELLECTUAL PROPERTY
// The Software and all related intellectual property rights remain the sole and exclusive property of the Licensor. The Licensee acquires no ownership or rights beyond those expressly granted in this Agreement.
// 
// 3. TERM & TERMINATION
// 3.1 Term
// This Agreement remains in effect until terminated.
// 
// 3.2 Termination
// The Licensor may terminate this Agreement immediately if the Licensee:
// (a) Breaches any term of this Agreement.
// (b) Attempts to modify, sublicense, or resell the Software.
// 
// 3.3 Effect of Termination
// Upon termination, the Licensee must immediately cease all use of the Software and delete or destroy all copies.
// 
// 4. DISCLAIMER & LIMITATION OF LIABILITY
// 4.1 The Software is provided "as is", without warranties of any kind, express or implied.
// 4.2 The Licensor is not liable for any damages arising from use or inability to use the Software.
// 
// 5. GOVERNING LAW & DISPUTE RESOLUTION
// This Agreement shall be governed by and construed in accordance with the laws of the United States and the European Union, without regard to conflict of law principles. Any disputes arising out of or in connection with this Agreement shall be resolved exclusively in the courts of CA for matters within the United States and in the courts of Germany for matters within the European Union.
// 
// 6. MISCELLANEOUS
// 6.1 This Agreement constitutes the entire understanding between the parties.
// 6.2 No waiver of any provision shall be deemed a further waiver of any other provision.
// 6.3 If any provision is found unenforceable, the remaining provisions shall remain in effect.
// 
// IN WITNESS WHEREOF, the parties have executed this Agreement as of the Effective Date.
// 
// Licensor:
// Discrete Wave
// 
// 


package pystim_pkg;

    bit XHa6pnky9OHnwJCUrxJFU1L = 0;

    function bit ifyOaEgyXCaLv0b6xNAuBbIYm();
        return XHa6pnky9OHnwJCUrxJFU1L;
    endfunction

    function void Jky7uhq1CwrihOso4QK28YJXeCW();
        XHa6pnky9OHnwJCUrxJFU1L = 1;
    endfunction

    function void kM852O6tLaJnJWn8zrJ3IyoVl();
        XHa6pnky9OHnwJCUrxJFU1L = 0;
    endfunction

    



import "DPI-C"  function int unsigned py_request_dpic(input int unsigned xzSl1YDjdgL94, output int unsigned qdzyIn9re8k);
import "DPI-C"  function int unsigned initialize_python_env_dpic(input int  IYHbBOJvF, int unsigned size);
import "DPI-C"  function bit is_python_interpreter_running_dpic();
import "DPI-C"  function int start_python_simulation_dpic();
import "DPI-C"  function int unsigned is_python_simulation_completed_dpic();
import "DPI-C"  function void stop_python_simulation_dpic();
import "DPI-C"  function int unsigned wait_for_python_simulation_termination_dpic();
import "DPI-C"  function longint unsigned get_nanoseconds();

import "DPI-C"  function int unsigned allocate_buffer_dpic(int unsigned IYHbBOJvF, int unsigned size);
import "DPI-C"  function int unsigned get_buffer_size_dpic(int unsigned IYHbBOJvF, int unsigned uT);
import "DPI-C"  function byte unsigned get_buffer_data_dpic(int unsigned IYHbBOJvF, int unsigned uT,  int unsigned  ajF);
import "DPI-C"  function int unsigned push_buffer_data_dpic(int unsigned IYHbBOJvF, int unsigned uT,  byte unsigned fF8b);
import "DPI-C"  function void release_buffer_dpic(int unsigned IYHbBOJvF, int unsigned uT);
import "DPI-C"  function bit is_buffer_exist_dpic(int unsigned IYHbBOJvF, int unsigned uT);
import "DPI-C"  function longint get_hash_dpic(longint value);


// import "DPI-C"  function int unsigned dpic_sync_env();



// export "DPI-C"  function sv_notify_get_item_ready;


    
typedef byte unsigned ivchfeRmyp8eAI8YrL[1000];
typedef byte unsigned GdBzqYsqX3Gg4zL[];

typedef enum int { gVZL,
                    qIe,
                    UvDh,
                    fpR1m6,
                    FXlN8,
                    tB85 } aaG5jlFq3yjGzshEL;
typedef enum int { 
                    SQuIE9F,
                    abjkc

                } GnnR0DtA;       


typedef enum int { 
                    IvnUAo9rcO7ndi = 0,
                    eh6FBn6IGshP4yP = 1,
                    B43Y23Bsm0h4Sv7 = 2,
                    gd7rG2nrajMfAoGC = 3


} SrrN2JymyCnhfUyiG;                    




    class VGXJq2DS;
  event K;
  local bit mcd6yhhv2wJ = 0;
  local bit fjHof5 = 0;

  function new(bit fjHof5 = 0);
    this.fjHof5 = fjHof5;
  endfunction

  function void trigger();
    mcd6yhhv2wJ = 1;
    ->K;
  endfunction

  task MzIo8li1zhpzto();
    if (mcd6yhhv2wJ == 1) begin
      if (fjHof5 == 0) begin
        mcd6yhhv2wJ = 0;
      end
      return;
    end
    @(K.triggered);
  endtask


  function void clear();
    mcd6yhhv2wJ = 0;
  endfunction


  function bit tFNeshESWAjp();
    return mcd6yhhv2wJ;
  endfunction

endclass


    

class XPKS2Jm2zrk;

    local int unsigned uT;
    local byte unsigned S6seuxxraleNYDC[];
    local bit jmudtAB3wQmZNw5WaBa = 0;
    local SrrN2JymyCnhfUyiG hzKtrMXaOdl;


    function new(SrrN2JymyCnhfUyiG hzKtrMXaOdl, longint uT = -1);
        this.hzKtrMXaOdl = hzKtrMXaOdl;
        if(uT > -1)begin
            /* verilator lint_off WIDTHTRUNC */
            q2JBpc(uT);
            /* verilator lint_on WIDTHTRUNC */


        end else begin
            int unsigned cBvbwS = allocate_buffer_dpic(AeT4idxzgAoqc8U(), this.S6seuxxraleNYDC.size());
            q2JBpc(cBvbwS);
        end
    endfunction


    function void put(byte unsigned S6seuxxraleNYDC[]);
        this.S6seuxxraleNYDC = S6seuxxraleNYDC;
        foreach(this.S6seuxxraleNYDC[a]) begin
            int unsigned k = push_buffer_data_dpic(AeT4idxzgAoqc8U(), knM9uB(), this.S6seuxxraleNYDC[a]);
        end
    endfunction

    local function int unsigned AeT4idxzgAoqc8U();
        return hzKtrMXaOdl;
    endfunction

    function int unsigned get(ref byte unsigned GOFNeO1KkTm2xlQzn[]);
        int unsigned cBvbwS = knM9uB();
        int unsigned size;

        if(GzqvrbyIFD367uJj56())begin
            size = UstPx28T();
            GOFNeO1KkTm2xlQzn = new[UstPx28T()];
            foreach(this.S6seuxxraleNYDC[a]) begin
                GOFNeO1KkTm2xlQzn[a] = this.S6seuxxraleNYDC[a];
            end
        end else begin
            size = get_buffer_size_dpic(AeT4idxzgAoqc8U(), cBvbwS);
            if(size > 0)begin
                GOFNeO1KkTm2xlQzn = new[size];
                this.S6seuxxraleNYDC = new[size];
                foreach(S6seuxxraleNYDC[a]) begin
                    this.S6seuxxraleNYDC[a] = get_buffer_data_dpic(AeT4idxzgAoqc8U(), cBvbwS, a);
                    GOFNeO1KkTm2xlQzn[a] = this.S6seuxxraleNYDC[a];
                end
            end
            if(!GzqvrbyIFD367uJj56())begin
                PgR0NH44UaEEOu();
            end
        end


        return size;
    endfunction


    function void PgR0NH44UaEEOu();
        release_buffer_dpic(AeT4idxzgAoqc8U(), knM9uB());
        this.jmudtAB3wQmZNw5WaBa = 1;
    endfunction


    function int unsigned UstPx28T();
        int unsigned size = GzqvrbyIFD367uJj56() ? S6seuxxraleNYDC.size() :  get_buffer_size_dpic(AeT4idxzgAoqc8U(), knM9uB());
        return size;
    endfunction


    local function void q2JBpc(int unsigned uT);
        this.uT = uT;
    endfunction

    function int unsigned knM9uB();
        return this.uT;
    endfunction


    function bit GzqvrbyIFD367uJj56();
        return jmudtAB3wQmZNw5WaBa; 
    endfunction

    function bit PnlyUz175G2KoQZ();
        return is_buffer_exist_dpic(AeT4idxzgAoqc8U(), knM9uB());
    endfunction

    static function XPKS2Jm2zrk X7Pz9wtll(SrrN2JymyCnhfUyiG hzKtrMXaOdl, byte unsigned S6seuxxraleNYDC[]);
        XPKS2Jm2zrk QM4YdMaqk = new(hzKtrMXaOdl);
        QM4YdMaqk.put(S6seuxxraleNYDC);
        return QM4YdMaqk;
    endfunction

endclass



    


//----------------------------------------------------------------------------
// Class: py_stim_configuration

// Description:
// Configuration class for the PyStim package.
// It includes settings for verbosity level, debug mode, simulation seed management, and exception handling.
//----------------------------------------------------------------------------
class py_stim_configuration;
    local aaG5jlFq3yjGzshEL zbZCTuXsxFR9u0z;
    local bit Th6a6F8eSi = 0;
    local longint unsigned cSKG = 0;
    local bit hdvytP2X0nUsrKN = 0;
    local bit il3B9qVtsVTUXu6XJW = 0;


    function new();
        this.zbZCTuXsxFR9u0z = gVZL;
    endfunction


    function void set_seed(longint unsigned cSKG);
        this.cSKG = cSKG;
    endfunction

    function longint unsigned get_seed();
        return this.cSKG;
    endfunction

    function aaG5jlFq3yjGzshEL jD1576yKUqi2gByN2TY();
        return this.zbZCTuXsxFR9u0z;
    endfunction

    function void FGOJm0DpK9ZMA63GVba(aaG5jlFq3yjGzshEL zbZCTuXsxFR9u0z);
        this.zbZCTuXsxFR9u0z = zbZCTuXsxFR9u0z;
    endfunction
   

    function void enable_debug_mode();
        this.Th6a6F8eSi = 1;
        FGOJm0DpK9ZMA63GVba(tB85);
    endfunction

    function void disable_debug_mode();
        this.Th6a6F8eSi = 0;
        FGOJm0DpK9ZMA63GVba(gVZL);
    endfunction

    //----------------------------------------------------------------------------
    // Function: enable_exception_printing
    //
    // Description:
    // Enables python exception printing. Python exceptions will be printed to the HDL simulator console. 
    //
    // Usage:
    // Call this function to activate exception printing functionality.
    //
    //----------------------------------------------------------------------------
    function void enable_exception_printing();
        this.hdvytP2X0nUsrKN = 1;
    endfunction


    //----------------------------------------------------------------------------
    // Function: disable_exception_printing
    //
    // Description:
    // Disables python exception printing. Python exceptions will not be printed to the HDL simulator console.
    //
    // Usage:
    // Call this function to deactivate exception printing functionality.
    //
    //----------------------------------------------------------------------------
    function void disable_exception_printing();
        this.hdvytP2X0nUsrKN = 0;
    endfunction

    //----------------------------------------------------------------------------
    // Function: is_exception_printing_enabled
    // Description:
    // This function checks if Python exception printing is enabled.
    //
    // Returns: 
    //   - bit: A boolean value indicating whether exception printing is enabled.
    //----------------------------------------------------------------------------
    function bit is_exception_printing_enabled();
        return this.hdvytP2X0nUsrKN;
    endfunction


    //----------------------------------------------------------------------------
    // Function: stop_on_exception
    //
    // Description:
    // Sets the PyStim to stop HDL simulation on Python exception. 
    //
    // Usage:
    // Call this function to configure the HDL simulation to finish simulation execution with error when an exception occurs. Error message will contain python exception.
    //----------------------------------------------------------------------------
    function void stop_on_exception();
        this.il3B9qVtsVTUXu6XJW = 1;
    endfunction



    //----------------------------------------------------------------------------
    // Function: continue_on_exception
    //  
    // Description:
    // Sets the PyStim to continue HDL simulation on Python exception.
    //
    // Usage:
    // Call this function to configure the HDL simulation to continue simulation execution when an exception occurs.
    function void continue_on_exception();
        this.il3B9qVtsVTUXu6XJW = 0;
    endfunction

    //----------------------------------------------------------------------------
    // Function: is_stop_on_exception
    //
    // Description:
    // Checks if the PyStim is configured to stop HDL simulation on Python exception.
    //
    // Returns:
    //   - bit: A boolean value indicating whether the simulation will stop on exception.
    //----------------------------------------------------------------------------
    function bit is_stop_on_exception();
        return this.il3B9qVtsVTUXu6XJW;
    endfunction


endclass



    

class NPGsJxiCDW10p1;
    // Class members and methods go here
    
    local aaG5jlFq3yjGzshEL zbZCTuXsxFR9u0z;
    local string name;
    local static NPGsJxiCDW10p1 uzev4i5[string];

    // Constructor
    function new(string name, aaG5jlFq3yjGzshEL zbZCTuXsxFR9u0z);
        // Initialize class members here
        this.name = name;
        this.zbZCTuXsxFR9u0z = zbZCTuXsxFR9u0z;

    endfunction

    function void FGOJm0DpK9ZMA63GVba(aaG5jlFq3yjGzshEL zbZCTuXsxFR9u0z);
        this.zbZCTuXsxFR9u0z = zbZCTuXsxFR9u0z;
    endfunction


    function aaG5jlFq3yjGzshEL jD1576yKUqi2gByN2TY();
        return this.zbZCTuXsxFR9u0z;
    endfunction

    function string get_name();
        return this.name;
    endfunction

    function void bnSJ(string NyiyvX7, aaG5jlFq3yjGzshEL zbZCTuXsxFR9u0z);
        log(NyiyvX7, zbZCTuXsxFR9u0z);
    endfunction

    
    function void log(string NyiyvX7, aaG5jlFq3yjGzshEL zbZCTuXsxFR9u0z);
        if (jD1576yKUqi2gByN2TY() <= zbZCTuXsxFR9u0z ) begin
            $display("[%s][%s] %s", get_name(), zbZCTuXsxFR9u0z.name().toupper(), NyiyvX7);
        end
    endfunction

    static function NPGsJxiCDW10p1 nmGFYV1AHb(string name = "main", aaG5jlFq3yjGzshEL zbZCTuXsxFR9u0z = UvDh);
        if (uzev4i5.exists(name) == 0) begin
            uzev4i5[name] = new(name, zbZCTuXsxFR9u0z);
        end
        return uzev4i5[name];
    endfunction

    
endclass

   
    class fVUtgi6rvH2fC3AcX86tD ;

    local longint unsigned EMcryrMBCsy;
    local longint unsigned y6M7byjLz;
    local string name;




    function new(string name);
        this.name = name;
    endfunction

    function longint unsigned dDptBFNonFPE6s();
        return this.EMcryrMBCsy;
    endfunction

    function longint unsigned UfxEenRLrSeO();
        return this.y6M7byjLz;      
    endfunction

    function void eCbnfghiRhU();
        this.EMcryrMBCsy = get_nanoseconds();
    endfunction

    function void K1ARKkw5mI();
        this.y6M7byjLz = get_nanoseconds(); 
    endfunction

    function longint unsigned X4UiKSqpAJN8NOnF();
        return this.y6M7byjLz - this.EMcryrMBCsy;
    endfunction

    function string HMvBjNt8VTixBEVdd();
        return $sformatf("[%s] Start time: %0t", get_name(), dDptBFNonFPE6s());
    endfunction

    function string get_name();
        return this.name;   
    endfunction

    function string jUdiKIgOhR2LmKLy0pEOPbwCUM8i();
        return $sformatf("[%s] End time: %0t, req taken: %0t [ms]", get_name(), UfxEenRLrSeO(), X4UiKSqpAJN8NOnF()/1000000);
    endfunction

    static function fVUtgi6rvH2fC3AcX86tD cxqQ1HTM7yjc3s4zBWMPAX(string name);
        fVUtgi6rvH2fC3AcX86tD AzCJE = new(name);
        AzCJE.eCbnfghiRhU();
        return AzCJE;
    endfunction

endclass

    

typedef class py_uint;
typedef class py_none;
typedef class py_int;
typedef class py_str;
typedef class py_float;
typedef class py_bool;
typedef class py_dict;
typedef class py_tuple;
typedef class JoCE8680znYtm6;
typedef class py_list;
typedef class py_pair;
typedef class py_attr;
typedef class py_error;
typedef class ac2aDeVy4FPPxFLc;
typedef class mGMl8qCc4I9SIwgV;
typedef class py_object;

typedef class p2y17vMAErxPUw;

typedef py_object py_object_list_t [$];


typedef py_dict py_kwargs;
typedef py_tuple py_args;

typedef enum  {
    Y7A4b4zK6GO708bAYghFsF,
    wbmQFtCIj1qcyRNCc0,
    Os05DvaY24tLa34JrhGR
} YW2RNdZ5pZb1jD;

class UxUbp5DqM9nD;

    YW2RNdZ5pZb1jD RrfB4;

    function new();
        Xg0DoEG1LL2bs();
    endfunction

    function void gxpNQnjVK(YW2RNdZ5pZb1jD RrfB4);
        this.RrfB4 = RrfB4;
    endfunction

    function YW2RNdZ5pZb1jD x7MYeFlYH();
        return this.RrfB4;
    endfunction


    function bit j0aixHXkOeBk();
        return RrfB4 == Y7A4b4zK6GO708bAYghFsF;
    endfunction

    function bit is_error();
        return RrfB4 == wbmQFtCIj1qcyRNCc0;
    endfunction

    function bit QDZpphmkre();
        return RrfB4 == Os05DvaY24tLa34JrhGR;
    endfunction

    function void nzKgUbB5C();
        this.RrfB4 = wbmQFtCIj1qcyRNCc0;
    endfunction

    function void WSUzFXayZEu();
        this.RrfB4 = Os05DvaY24tLa34JrhGR;
    endfunction

    function void Xg0DoEG1LL2bs();
        this.RrfB4 = Y7A4b4zK6GO708bAYghFsF;
    endfunction

endclass


//----------------------------------------------------------------------------
// Class: py_object_api
// Description:
//   This is an interface class that defines the API for Python objects in SystemVerilog.
//   It provides a set of pure virtual functions that must be implemented by
//   any class that inherits from this interface. The functions defined in this
//   interface are used to interact with Python objects, including calling methods,
//   accessing attributes, and checking the type of the object.
//-----------------------------------------------------------------------------
interface class py_object_api;






    //--------------------------------------------------------------------------
    // Function: attr
    // Description:
    //   Retrieves a Python object attribute by name.
    //
    // Arguments:
    //   name - The name of the attribute to retrieve.
    //
    // Returns:
    //   py_object - representing the specified attribute.
    //
    //--------------------------------------------------------------------------
    pure virtual function py_object attr(string name);

    //-------------------------------------------------------------------------
    // Function: obtain()
    // Description:
    // Obtains the handler to python instance.
    //
    // This function available for python complex types, types, packages, and modules.
    // This method allow to obtain the handler to the python instance without any method invocation.
    // Foe example, to obtain the handler to the Decimal.exp method:
    // (code)
    //  //equivalent to: from decimal import Decimal 
    //  py_object Decimal = py_module::import_("decimal").attr("Decimal").obtain();
    //  py_object decimal_exp = Decimal.attr("exp");
    // (end)
    //
    // Returns:
    //     py_object - The handler of the python instance.
    //-------------------------------------------------------------------------
    pure virtual function py_object obtain(py_object key = null);



    //-------------------------------------------------------------------------
    // Function: contains
    // Description:
    //     Check if the given item is contained within this object, i.e. item in obj.
    //
    // Arguments:
    //     py_object obj - The object to check for containment.
    //
    // Returns:
    //     bit - 1 if the item is contained, otherwise 0.
    //-------------------------------------------------------------------------
    // pure virtual function bit contains(py_object obj);

    //-------------------------------------------------------------------------
    // Function: is
    // Description:
    //     Check if the given object is of the same type as this object. Equivalent to obj is other in Python.
    //
    // Parameters:
    //     obj - The object to check for type equality.
    //
    // Returns:
    //     bit - 1 if the object is of the same type, otherwise 0.
    //-------------------------------------------------------------------------
    // pure virtual function bit is(py_object_api obj);


    //-------------------------------------------------------------------------
    // Function: is_none
    // Description:
    //     Check if the current object is of type None. Equivalent to obj is None in Python.
    //
    // Returns:
    //     bit - 1 if the object is None, otherwise 0.
    //-------------------------------------------------------------------------
    pure virtual function bit is_none();

    //-------------------------------------------------------------------------
    // Function: equal
    // Description:
    //     Check if the current object is equal to the given object. Equivalent to obj == other in Python.
    //
    // Parameters:
    //     obj - The object to check for equality.
    //
    // Returns:
    //     bit - 1 if the objects are equal, otherwise 0.
    //-------------------------------------------------------------------------
    pure virtual function bit is_equal(py_object other);


    //-------------------------------------------------------------------------
    // Function: doc   
    // Description:
    //     Retrieves the documentation string for the current object.
    //
    // Returns:
    //     py_object - The documentation string for the object.
    //
    //-------------------------------------------------------------------------
    // pure virtual function py_object doc();


    //-------------------------------------------------------------------------
    // Function: ref_count
    // Description:
    //     Retrieves the reference count for the current object.
    //
    // Returns:
    //     int - The reference count for the object.
    //-------------------------------------------------------------------------
    // pure virtual function int ref_count();


    //-------------------------------------------------------------------------
    // Function: delete
    // Description:
    //     Deletes the current object and releases its resources.
    //
    //-------------------------------------------------------------------------
    pure virtual function void delete();
    

endclass






/**
 * Class: py_object
 * Description:
 * The py::object class represents a Python object in SystemVerilog and is the base class for many other types
 * in PyStim. It provides a common interface for all Python objects and defines a set of common functions.
 * Can hold any Python object reference. Supports method calls, attribute access, and conversion to other types.
 * Interoperates with other PyStim types.
*/
virtual class py_object ; //implements py_object_api;

    local cJ7amx5TrpRx3xecNmD8HzZ0::NyiyvX7 eHlDGQoLpyu;
    local y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg qWsJbRDvn = new();
    protected y2qG0tPDlQH0v2JhCuoOEOmnKBumi::B4sVbQs8a InsO = new();
    local UxUbp5DqM9nD RrfB4 = new();

    static protected const bit  wn0bbuT = 1;


    

    //-------------------------------------------------------------------------
    // Function: equal
    // Description:
    //     Check if the current object is equal to the given object. Equivalent to obj == other in Python.
    //
    // Parameters:
    //     obj - The object to check for equality.
    //
    // Returns:
    //     bit - 1 if the objects are equal, otherwise 0.
    //-------------------------------------------------------------------------
    virtual function bit is_equal(py_object other);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = new(); 
        py_object KRF;
        py_bool Iuo;
        bit MDlazuuT6;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        uKip.IMsxV26A4rvl2rg(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::wVsXT7cztgVMZreeu5Ev);
        uKip.VT4C9WftkwHeT(k2KobehflGzp6());
        if(other != null)begin
            JoCE8680znYtm6 BXcEEdpmaLa = YFh2rfTVN7uUqniXO3Tk(other);
            uKip.h9aXR3Of(mGMl8qCc4I9SIwgV::gmOpJQ(BXcEEdpmaLa));
            KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
            if(KRF.is_error())begin
                $error("Error in checking is_none status of the object. Error: %s", KRF.to_string());
            end
            Iuo = KRF.cast_bool();
            if(Iuo == null)begin
                p2y17vMAErxPUw::wGD97i6Xu6I7rRq4Tf("is_none() method should return py_bool type.");
            end
            MDlazuuT6 = Iuo.get_value();
        end else begin
            $error("The other object should not be null.");
            MDlazuuT6 = 0;
        end
        return MDlazuuT6;
    endfunction

    //-------------------------------------------------------------------------
    // Function: is_none
    // Description:
    //     Check if the current object is of type None. Equivalent to obj is None in Python.
    //
    // Returns:
    //     bit - 1 if the object is None, otherwise 0.
    //-------------------------------------------------------------------------
    virtual function bit is_none();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = new(); 
        py_object KRF;
        py_bool Iuo;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        uKip.IMsxV26A4rvl2rg(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::CDCPuM5fDwLBkRnl7uTrZ0);
        uKip.VT4C9WftkwHeT(k2KobehflGzp6());
        KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        if(KRF.is_error())begin
            $error("Error in checking is_none status of the object. Error: %s", KRF.to_string());
        end
        Iuo = KRF.cast_bool();
        if(Iuo == null)begin
            p2y17vMAErxPUw::wGD97i6Xu6I7rRq4Tf("is_none() method should return py_bool type.");
        end
        return Iuo.get_value();
    endfunction

    /**
     * Ignore:
     * Function: py_object()
     * return function call descriptor for the current object.
     */
    virtual  function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb HqIG5pUWTUhYd3S4E0fvnKYZ68KR(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb FslKTt1MbJ = null);
        return null;
    endfunction


    /**
     * Function: is_ok()
     * Description:
     * Return the the current state of the object. If the object is *not* <py_error> object, it returns 1.
     * Complementary function to <is_error>.
     *
     * Returns: 
     *      bit - 1 if the current state is okay, otherwise returns 0.
     */
    virtual function bit is_ok();
        return !is_error();
    endfunction

    /**
     * Function: is_error()
     * Description:
     * Checks if there is an error occurred for recent operation.
     *
     * If an error has occurred during Python method invocation, this function returns 1. Otherwise, it returns 0.
     * User should check whether returned object of python method invocation is not py_error.
     * Complementary function to <is_ok>.
     * To get textual error message use to_string() method of the current object.
     *   
     * Returns:
     *  bit - 0 if no error, 1 if there is an error.
     */
    virtual function bit is_error();
        return 0;
    endfunction

    function  y2qG0tPDlQH0v2JhCuoOEOmnKBumi::B4sVbQs8a  k2KobehflGzp6();
        return this.InsO;
    endfunction


    function  string  v7M5HmUGwT3f0v8Ne();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::B4sVbQs8a  InsO = k2KobehflGzp6();
        string name = $sformatf("%0d_%s_%s", InsO.knM9uB(), InsO.get_type().name(), InsO.SyOwAKun());
        return name;
    endfunction

    function void VT4C9WftkwHeT(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::B4sVbQs8a InsO);
        this.InsO = InsO;
    endfunction 

    function void VSlM9qI5(string name);
        this.InsO.VSlM9qI5(name);
    endfunction

    function string SyOwAKun();
        return this.InsO.SyOwAKun();
    endfunction

    protected function void xXS6vSHBHid(longint unsigned uT);
        this.InsO.q2JBpc(uT);
    endfunction

    function longint unsigned YqNxqnrd2qc();
        return this.InsO.knM9uB();
    endfunction

    protected function void d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::qEitaktvmtyExXQM HHNocg3m);
        this.InsO.EooKojCq(HHNocg3m);
    endfunction

    function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::qEitaktvmtyExXQM q28o15ZAKhEvup82U5Ke();
        return this.InsO.get_type();
    endfunction


    // function bit is_objects_type_equal(py_object other);
    //     return param_wrp.is_type_equal(type);
    // endfunction




    virtual function void delete();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = new(); 
        py_object KRF; 
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        if(RrfB4.j0aixHXkOeBk())begin
            uKip.IMsxV26A4rvl2rg(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::qkSLDx3W02J79CEXCo);
            uKip.VT4C9WftkwHeT(k2KobehflGzp6());
            KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
            if(KRF.is_error())begin
                $error("Error while deallocating object. Error: %s", KRF.to_string());
            end
            RrfB4.WSUzFXayZEu();
        end else begin
            p2y17vMAErxPUw::mKfthePfevoR0TJ6jRUA6V(v7M5HmUGwT3f0v8Ne());
        end
    endfunction

    /**
     * Function: obtain()
     * Description:
     * Obtains the handler to python instance.
     *
     * This function available for python complex types, types, packages, and modules.
     * This method allow to obtain the handler to the python instance without any method invocation.
     * Foe example, to obtain the handler to the Decimal.exp method:
     * (code)
     *  //equivalent to: from decimal import Decimal 
     *  py_object Decimal = py_module::import_("decimal").attr("Decimal").obtain();
     *  py_object decimal_exp = Decimal.attr("exp");
     * (end)
     *
     * Returns:
     *     py_object - The handler of the python instance.
     */
    virtual function py_object obtain(py_object key = null);
        p2y17vMAErxPUw::NkXWOaQNPTbqb22YqV9IB8Gmd();
        return null;
    endfunction


    function void QUlhqaMi1eO41(int unsigned ajF);
        this.qWsJbRDvn.QUlhqaMi1eO41(ajF);
    endfunction

    function int unsigned MZvmUSgwz99qV();
        return this.qWsJbRDvn.MZvmUSgwz99qV();
    endfunction

    function void JKlMlKyvJYe(cJ7amx5TrpRx3xecNmD8HzZ0::NyiyvX7 oxM);
        this.eHlDGQoLpyu = oxM;
    endfunction

    //----------------------------------------------------------------------------
    // Function: to_string
    // 
    // Description:
    //     Textual representation of the object.
    //
    // Returns:
    //     A string that represents the object.
    //----------------------------------------------------------------------------
    pure virtual function string to_string();


    virtual function voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 aONmg154uKKVV(ref byte unsigned qrULNPeVvojjbmW []);
        byte unsigned pdpAdFy7sN2U7O5LtS1m80m [];
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg oxM = new();

        
        voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 mrE = eHlDGQoLpyu.aONmg154uKKVV(pdpAdFy7sN2U7O5LtS1m80m);
        if(mrE == voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            qWsJbRDvn.JKlMlKyvJYe(pdpAdFy7sN2U7O5LtS1m80m);
            mrE = qWsJbRDvn.aONmg154uKKVV(qrULNPeVvojjbmW);
        end
        return mrE;
    endfunction


    /**
     * Ignore:
     * Function: get_type() 
     * Retrieves the type of the parameter.
     *
     * Returns:
     *     The type of the parameter.
     */
    function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZCU4Ykicox get_type();
        return qWsJbRDvn.ZViAbNEWJ2IHJbf34w();
    endfunction



    function void EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZCU4Ykicox ZCU4Ykicox);
        this.qWsJbRDvn.GxefFgsC6RPcdoIdwn(ZCU4Ykicox);
    endfunction

    function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg G3vzGUMsbcq5K72hX();
        return qWsJbRDvn;
    endfunction


    /**
     * Function: clone()
     * Description:
     * Creates a clone of the current py_object object.
     * 
     * This pure virtual function is intended to be overridden by derived classes
     * to provide a mechanism for cloning py_object objects. The function should
     * return a new instance of the derived class that is a copy of the current object.
     * For python complex types, python objects handlers, the function should return a new 
     * instance that referencing the same python object (with increasing reference count of the 
     * corresponding python object).
     * For basic python data types it return a new instance with the same value.
     * 
     * Returns:
     *     py_object - A new instance of the derived class that is a copy of the current object.
     */
    pure virtual function py_object clone();




    virtual function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg CQoMvQQYFDbpO53I9VDlPi1(int unsigned ajF);
        byte unsigned pdpAdFy7sN2U7O5LtS1m80m [];
        voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 mrE = eHlDGQoLpyu.aONmg154uKKVV(pdpAdFy7sN2U7O5LtS1m80m);
        if(mrE == voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            qWsJbRDvn.JKlMlKyvJYe(pdpAdFy7sN2U7O5LtS1m80m);
            qWsJbRDvn.QUlhqaMi1eO41(ajF);
        end else begin
            p2y17vMAErxPUw::tx3dbJAHkO9pbrCuP6Y();
        end
        return qWsJbRDvn;
    endfunction

    /**
     * Function: cast_error()
     * Description:
     *  Casts the current object to a py_error type if the type matches.
     *
     * This function attempts to cast the current object to a py_error type.
     * py_error is a type that represents an error object in PyStim.
     *
     * Returns:
     *  py_error - The casted py_error object if successful, otherwise null.
     */
    function py_error cast_error();
        py_error xX6KVo = null;

        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::OWlXzYwAhNQpw2Vm
            || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction


    /**
     * Function: cast_uint()
     * Description:
     * Casts the current object to a py_uint type.
     *
     * This function attempts to cast the current object to a py_uint type. If the type of the
     * current object is not unsigned integer, cast operation fails, the function returns null.
     *
     * Returns:
     *     py_uint - The casted object if successful, otherwise null.
     */
    function py_uint cast_uint();
        py_uint xX6KVo = null;

        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::DznvfhN3G7kVWbr
            || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction

    /**
     * Function: cast_none()
     * Description:
     * Casts the current object to a `py_none` object .
     *
     * This function attempts to cast the current object to a `py_none` type. If the type of the
     * current object is not `py_none` or the cast operation fails, the function returns null.
     *
     * Returns:
     *     py_none - The casted object if successful, otherwise null.
     */
    function py_none cast_none();
        py_none xX6KVo = null;

        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hSVNDN5PbMYZac5
            || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction

    protected function py_int TDFhfZXNz();
        py_int xX6KVo = null;
        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UJaFhKq29wH77u
            || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction

    /**
     * Function: cast_int()
     * Description:
     * Casts the current object to a py_int type.
     *
     * This function attempts to cast the current object to a py_int type. If the type of the
     * current object is not integer, cast operation fails, the function returns null.
     *
     * Returns:
     *     py_int - object if the cast is successful, otherwise null.
     */
    function py_int cast_int();
        py_uint v7szk0ClHlnrC5 = null;
        py_int Z864mpMPfnC7V = null;
        case(get_type())
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::DznvfhN3G7kVWbr:begin
                v7szk0ClHlnrC5 = cast_uint();
                if(v7szk0ClHlnrC5 != null)begin
                    Z864mpMPfnC7V = new(v7szk0ClHlnrC5.get_value());
                end
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UJaFhKq29wH77u:begin
                Z864mpMPfnC7V = TDFhfZXNz();
            end
        endcase
        return Z864mpMPfnC7V;
    endfunction

    /**
     * Function: cast_string()
     * Description:
     * Casts the current object to a py_str type.
     * 
     * This function attempts to cast the current object to a py_str type. If the type of the 
     * current object is not string, the function returns null.
     * 
     * Returns:
     *     py_str - The casted object if successful, otherwise null.
     */
    function py_str cast_string();
        py_str xX6KVo = null;
        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::otMAUDlFbfRCYUFhs
            || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction

    /**
     * Function: cast_float()
     * Description:
     * Casts the current object to a py_float type.
     *
     * This function attempts to cast the current object to a py_float type. If the type of the 
     * current object is real, the function returns null.
     *
     * Returns:
     *     py_float - The casted object if successful, otherwise null.
     */
    function py_float cast_float();
        py_float xX6KVo = null;
        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::emC9vBHLXztIaCH
           || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction

    /**
     * Function: cast_bool()
     * Description:
     * Casts the current object to a py_bool type .
     *
     * This function attempts to cast the current object to a py_bool type.
     * If the type of the current object is not boolean, the function returns null.
     *
     * Returns:
     *     py_bool - The casted object if successful, otherwise null.
     */
    function py_bool cast_bool();
        py_bool xX6KVo = null;
        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::uyHRtoxmDaFIh3K
            || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction

    /**
     * Function: cast_dict()
     * Description:
     * Casts the current object to a py_dict type.
     *
     * This function attempts to cast the current object to a py_dict type.
     * If the type of the current object is not python dict type,
     * the function returns null.
     *
     * Returns:
     *     py_dict - The casted object if successful, otherwise null.
     */
    function py_dict cast_dict();
        py_dict xX6KVo = null;
        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY
            || q28o15ZAKhEvup82U5Ke() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::sQ4r
            || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction

    function py_pair cast_dict_pair();
        py_pair xX6KVo = null;
        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::fNlFcdD5szwz52s
           || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction

    /*
     * Function: cast_tuple
     * Description:
     * Casts the current object to a py_tuple type.
     *
     * This function attempts to cast the current object to a py_tuple type.
     * If the type of the current object is not python dict type,
     * the function returns null.
     *
     * Returns:
     *     py_tuple - The casted object if successful, otherwise null.
     */
    function py_tuple cast_tuple();
        py_tuple xX6KVo = null;
        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY
            || q28o15ZAKhEvup82U5Ke() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::IQRwk
            || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction


    /**
     * Function: cast_list()
     * Description:
     * Casts the current object to a py_list type.
     *
     * This function attempts to cast the current object to a py_list type.
     * If the type of the current object is not python dict type,
     * the function returns null.
     *
     * Returns:
     *     py_list - The casted object if successful, otherwise null.
     */
    function py_list cast_list();
        py_list xX6KVo = null;
        if(get_type() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY
            || q28o15ZAKhEvup82U5Ke() != y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WUM4
            || !$cast(xX6KVo, this))begin
            xX6KVo = null;
        end
        return xX6KVo;
    endfunction


    virtual function py_attr chain_call(py_object args = null, py_object kwargs = null);
        p2y17vMAErxPUw::NkXWOaQNPTbqb22YqV9IB8Gmd();
        return null;
    endfunction


    /**
     * Function: call
     * Description:
     * Calls a Python object method.
     *
     * This function calls a Python object method with the specified arguments.
     * The function accept arbitrary number of arguments and keyword arguments. 
     * keyword arguments should be passed as system verilog positional arguments.
     * (code)
     *  py_tuple my_args = pystim_pkg::tuple_({py::int_(2), py::str_("test")});
     *  py_dict my_kwargs = pystim_pkg::dict_({py::pair_(py::str_("key1"),py::int_(1)),
     *                                         py::pair_(py::str_("key2"), py::int_(2))});
     *
     *  some_python_object_a.call(py::int_(2), py::str_("hello world"), .args(my_args), .kwargs(my_kwargs)); ;
     *  some_python_object_b.call(.args(my_args), .kwargs(my_kwargs));
     *  some_python_object_b.call(py::int_(2),.kwargs(my_kwargs)); ;
     * (end)
     * The args arguments derives from py_tuple and kwargs derives from py_dict.
     *
     * The function returns the result of the method invocation as a py_object object.
     *
     * Arguments:
     *     py_object - arbitrary number of arguments separated by commas.
     *     py_object - args - Arbitrary Positional Arguments, passed as a py_list of py_object objects representing the arguments to pass to the method.
     *     py_object - kwargs - Arbitrary Keyword Arguments, passed as a py_dict of py_object objects representing the keyword arguments to pass to the method.
     *
     * Returns:
     *     py_object - The result of the method call.If the method call fails, the function returns a py_error object. User should check the type of returned object.
     * If during the method invocation an error occurs, <is_error> function will return 1. <to_string> function will return the textual error message or textual representation of exception.
     *
     */

    virtual function py_object call(
        py_object arg1 = null, py_object arg2 = null, py_object arg3 = null,
        py_object arg4 = null, py_object arg5 = null, py_object arg6 = null,
        py_object arg7 = null, py_object arg8 = null, py_object arg9 = null,
        py_object arg10 = null, py_object arg11 = null, py_object arg12 = null,
        py_object arg13 = null, py_object arg14 = null, py_object arg15 = null,
        py_object arg16 = null, py_object arg17 = null, py_object arg18 = null,
        py_object arg19 = null, py_object arg20 = null,
        py_object args = null, py_object kwargs = null);
        p2y17vMAErxPUw::NkXWOaQNPTbqb22YqV9IB8Gmd();
        return null;
    endfunction

    //--------------------------------------------------------------------------
    // Function: attr
    // Description:
    //   Retrieves a Python object attribute by name.
    //
    // Arguments:
    //   name - The name of the attribute to retrieve.
    //
    // Returns:
    //   py_object - representing the specified attribute.
    //
    //--------------------------------------------------------------------------
    virtual function py_object attr(string name);
        p2y17vMAErxPUw::NkXWOaQNPTbqb22YqV9IB8Gmd();
        return null;
    endfunction
    

    protected function GnnR0DtA PuekHqyJTI(XPKS2Jm2zrk QM4YdMaqk, output py_object GUoYfzhzR, output string gsvV2oIPYtWb0, output  y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb PZCEhvHUfBqQzFOC2k );

        int unsigned hmtUvpfmxDpxf6 = 0;
        byte unsigned S6seuxxraleNYDC[];
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb ieajgWHJtbcvqW = new();
        GnnR0DtA mrE = abjkc;
        if(ifyOaEgyXCaLv0b6xNAuBbIYm())begin
            mrE = GnnR0DtA ' ( py_request_dpic(QM4YdMaqk.knM9uB(), hmtUvpfmxDpxf6));
            if(mrE == SQuIE9F)begin
                int unsigned size;
                /* verilator lint_off WIDTHEXPAND */
                XPKS2Jm2zrk QfZpx = new(IvnUAo9rcO7ndi, hmtUvpfmxDpxf6);
                /* verilator lint_on WIDTHEXPAND */
                if(QfZpx.PnlyUz175G2KoQZ())begin
                    size = QfZpx.get(S6seuxxraleNYDC);
                    if(ieajgWHJtbcvqW.iCVdDbgr4XfweYV(S6seuxxraleNYDC) == voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
                        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::R8uakIYugvXXLhY b0TJAyGQ = ieajgWHJtbcvqW.RLJU1JY2aB();
                        if(b0TJAyGQ.O3yEEaeb4tfCjGG() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::OFgr7xs0387RcGRcd2K)begin
                            GUoYfzhzR = ac2aDeVy4FPPxFLc::kgwA7i(ieajgWHJtbcvqW);
                            mrE  = SQuIE9F;
                        end else if(b0TJAyGQ.O3yEEaeb4tfCjGG() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::wHNlo8iCC90Hs8DpE)begin
                            py_error IXPOZ = new(b0TJAyGQ.cCNKbcFHXxOKHtUcX());
                            GUoYfzhzR = IXPOZ;
                            gsvV2oIPYtWb0 = b0TJAyGQ.cCNKbcFHXxOKHtUcX();
                            // $error("[ERROR] Python method invocation error: %s", error_message);
                            mrE = abjkc;
                        end else begin //handling exception 
                            py_stim_configuration cfg;
                            py_error IXPOZ = new(b0TJAyGQ.cCNKbcFHXxOKHtUcX());
                            GUoYfzhzR = IXPOZ;
                            gsvV2oIPYtWb0 = b0TJAyGQ.cCNKbcFHXxOKHtUcX();
                            mrE = abjkc;
                            cfg = Qy0q0wdlLrOZN3zwo();
                            if(cfg.is_exception_printing_enabled())begin
                                $display("[PYTHON EXCEPTION] Python method invocation exception: %s", gsvV2oIPYtWb0);
                            end
                            if(cfg.is_stop_on_exception())begin
                                $error("[PYTHON EXCEPTION] Python method invocation exception: %s", gsvV2oIPYtWb0);
                            end 
                        end
                    end else begin
                        GUoYfzhzR = null;
                        gsvV2oIPYtWb0 = "Protocol Buffers deserialization failure.";
                        mrE = abjkc;
                    end
                end else begin
                    mrE = abjkc;
                    gsvV2oIPYtWb0 = {"SV Python method invocation returned not existing buffer id: %d.", hmtUvpfmxDpxf6};
                end
            end
            if(mrE == abjkc)begin
                PZCEhvHUfBqQzFOC2k = null;
            end else begin
                PZCEhvHUfBqQzFOC2k = ieajgWHJtbcvqW;
            end
        end else begin
            $fatal(1, "Python interpreter should be initialized before usage. Use pystim: initialize_interpreter/finalize_interpreter method to manage interpreter lifetime.");
        end
        return mrE;
    endfunction


    protected function py_object zz2Yxq1FvEa(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb ieajgWHJtbcvqW, output y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb PZCEhvHUfBqQzFOC2k);
        py_object GUoYfzhzR;
        byte unsigned qrULNPeVvojjbmW[];



        if(ieajgWHJtbcvqW.aONmg154uKKVV(qrULNPeVvojjbmW) == voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            XPKS2Jm2zrk QM4YdMaqk = XPKS2Jm2zrk::X7Pz9wtll(IvnUAo9rcO7ndi ,qrULNPeVvojjbmW);
            string gsvV2oIPYtWb0;
            GnnR0DtA mrE = PuekHqyJTI(QM4YdMaqk, GUoYfzhzR, gsvV2oIPYtWb0, PZCEhvHUfBqQzFOC2k);
            if(mrE != SQuIE9F && GUoYfzhzR == null)begin
                p2y17vMAErxPUw::sIZhIFz4jmBwcLp4BX8KTZ9Y2J1i4yQvL4q(ieajgWHJtbcvqW.h0DAtLg9ISRZZ(), gsvV2oIPYtWb0);
            end
        end else begin
            p2y17vMAErxPUw::tx3dbJAHkO9pbrCuP6Y();
        end
        
        return GUoYfzhzR;
    endfunction

    static function JoCE8680znYtm6 YFh2rfTVN7uUqniXO3Tk(input py_object arg1 = null,  input py_object arg2 = null,  input py_object arg3 = null,
                                        input py_object arg4 = null,  input py_object arg5 = null,  input py_object arg6 = null,
                                        input py_object arg7 = null,  input py_object arg8 = null,  input py_object arg9 = null,
                                        input py_object arg10 = null, input py_object arg11 = null, input py_object arg12 = null,
                                        input py_object arg13 = null, input py_object arg14 = null, input py_object arg15 = null,
                                        input py_object arg16 = null, input py_object arg17 = null, input py_object arg18 = null,
                                        input py_object arg19 = null, input py_object arg20 = null, input py_object qIddY = null);
        py_object args[$];
        JoCE8680znYtm6 PiSxbG5tiq = null;
        if(arg1 != null)begin
            args.push_back(arg1);
            if(arg2 != null)begin
                args.push_back(arg2);
                if(arg3 != null)begin
                    args.push_back(arg3);
                    if(arg4 != null)begin
                        args.push_back(arg4);
                        if(arg5 != null)begin
                            args.push_back(arg5);
                            if(arg6 != null)begin
                                args.push_back(arg6);
                                if(arg7 != null)begin
                                    args.push_back(arg7);
                                    if(arg8 != null)begin
                                        args.push_back(arg8);
                                        if(arg9 != null)begin
                                            args.push_back(arg9);
                                            if(arg10 != null)begin
                                                args.push_back(arg10);
                                                if(arg11 != null)begin
                                                    args.push_back(arg11);
                                                    if(arg12 != null)begin
                                                        args.push_back(arg12);
                                                        if(arg13 != null)begin
                                                            args.push_back(arg13);
                                                            if(arg14 != null)begin
                                                                args.push_back(arg14);
                                                                if(arg15 != null)begin
                                                                    args.push_back(arg15);
                                                                    if(arg16 != null)begin
                                                                        args.push_back(arg16);
                                                                        if(arg17 != null)begin
                                                                            args.push_back(arg17);
                                                                            if(arg18 != null)begin
                                                                                args.push_back(arg18);
                                                                                if(arg19 != null)begin
                                                                                    args.push_back(arg19);
                                                                                    if(arg20 != null)begin
                                                                                        args.push_back(arg20);
                                                                                    end
                                                                                end
                                                                            end
                                                                        end
                                                                    end
                                                                end
                                                            end
                                                        end
                                                    end
                                                end
                                            end
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
        end




        if(qIddY != null)begin
            py_tuple iRGbm7OOECl;
            if(!$cast(iRGbm7OOECl, qIddY))begin
                p2y17vMAErxPUw::wGD97i6Xu6I7rRq4Tf("args should be of type py_tuple.");
            end
            for(longint unsigned a = 0; a < iRGbm7OOECl.size(); a++)begin
                args.push_back(iRGbm7OOECl.get(a));
            end
        end
        if(args.size() > 0)begin
            PiSxbG5tiq = JoCE8680znYtm6::create(args);
        end
        return PiSxbG5tiq;
    endfunction       


endclass

/**
 * Class : py_callable
 * Description:
 * A class representing a callable Python object in SystemVerilog.
 * This class is used to represent Python functions, methods, objects, and other callable objects.
 * It provides methods for invoking the callable object and accessing its attributes.
 */ 
virtual class py_callable extends py_object;

    local py_callable bGqETT;
    local string name;
    local bit dokVOcoR = 0;
    local y2qG0tPDlQH0v2JhCuoOEOmnKBumi::Y6kVTgJKWY2 lxE9TsmwyW7r;

    function new(py_callable bGqETT = null);
        this.bGqETT = bGqETT;
    endfunction

    function py_callable mBDudUgTyr();
        return bGqETT;
    endfunction

    function bit SlkiIdkGtG();
        return bGqETT != null;
    endfunction

    function bit XR37flYScpD();
        return dokVOcoR;
    endfunction

    protected function void s8kTer7TlLDJU3HOL();
        this.dokVOcoR = 1;
    endfunction

    function void D0CHQWws(string name);
        this.name = name;
    endfunction

    function string get_name();
        return this.name;
    endfunction

    virtual function py_attr chain_attr(string name, py_object args = null, py_object kwargs = null);
        return null;
    endfunction

    function void YFIOtaI9wCs1unNpV(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::Y6kVTgJKWY2 lxE9TsmwyW7r);
        this.lxE9TsmwyW7r = lxE9TsmwyW7r;
    endfunction

    protected function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::Y6kVTgJKWY2 KETsDDdZZLE8t1W();
        return this.lxE9TsmwyW7r;
    endfunction

    protected function void JOwGZ8FxH31xSSGM();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = HqIG5pUWTUhYd3S4E0fvnKYZ68KR();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        py_object KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        if(KRF != null)begin
            py_callable dcabvu3D;
            if(!$cast(dcabvu3D, KRF))begin
                p2y17vMAErxPUw::wGD97i6Xu6I7rRq4Tf("cannot cast to py_callable");
            end
            VT4C9WftkwHeT(dcabvu3D.k2KobehflGzp6());
        end
    endfunction


    //--------------------------------------------------------------------------
    // Function: attr
    // Description:
    //   Retrieves a Python object attribute by name.
    //
    // Arguments:
    //   name - The name of the attribute to retrieve.
    //
    // Returns:
    //   py_object - representing the specified attribute.
    //
    //--------------------------------------------------------------------------
    virtual function py_object attr(string name);
        py_attr FAPxE = new(this);
        FAPxE.D0CHQWws(name);
        FAPxE.YFIOtaI9wCs1unNpV(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::jmggOw7bbEkxqAkcer);
        return FAPxE;
    endfunction

    pure virtual  function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb HqIG5pUWTUhYd3S4E0fvnKYZ68KR(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb FslKTt1MbJ = null);

    //----------------------------------------------------------------------------
    // Function: clone
    // Description: Pure virtual function that creates and returns a copy of the 
    //              current object. The returned object is of type `py_object`.
    // Returns: A new instance of `py_object` that is a clone of the current object.
    //----------------------------------------------------------------------------
    pure virtual function py_object clone();

    /*
     * Function: to_string
     * Return a string representation of the object.
     *
     * Returns:
     *   string - A string representation of the object.
     */
    virtual function string to_string();
        return $sformatf("name: '%s',  path: {id: %0d, name: '%s'}", get_name(), YqNxqnrd2qc(), SyOwAKun());
    endfunction

endclass


/**
 * Class: py_error
 * Description:
 * A class representing an error in the Python simulation environment.
 * In case of any exception during Python method invocation, the py_error object is returned.
 * Whenever you call into Python (e.g. invoking a py::object, calling a bound function, importing a module, etc.)
 * and that operation raises in Python, PyStim will intercept it, clear the Python error indicator, and throw a py_error in SystemVerilog.
 * To get the textual error message, use the to_string() method of the current object.
 * Error message is a string that returned by Python exception.
 * 
 */
class py_error extends py_object;

    local string gsvV2oIPYtWb0;

    virtual function bit is_none();
        // py_error is not None
        return 0;
    endfunction


    static function py_error empty();
        py_error obj = new("");
        return obj;
    endfunction

    static function py_error create(string gsvV2oIPYtWb0);
        py_error obj = new(gsvV2oIPYtWb0);
        return obj;
    endfunction


    static function bit is_instance_of(py_object obj);
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::OWlXzYwAhNQpw2Vm;
    endfunction





    function new(string gsvV2oIPYtWb0);
        super.new();
        EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::OWlXzYwAhNQpw2Vm);
        d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UCYjgjygzy);
        this.gsvV2oIPYtWb0 = gsvV2oIPYtWb0;
    endfunction

    // Function: to_string 
    // Description:
    // Returns string representation of py_error. String represent a error message.
    // 
    // Return:
    //  string - string containing the error message.
    virtual function string to_string();
        return gsvV2oIPYtWb0;
    endfunction



    /*
     * Function: get_value
     * Description:
     * Returns the error message as a string. Equivalent to <to_string> method.
     *
     * Returns:
     *   A string containing the error message.
     */
    function string get_value();
        return gsvV2oIPYtWb0;
    endfunction

    /*
     * Function: is_error
     * Description:
     * This function returns a bit indicating an error state.
     * For object of py_error class, it always returns 1.
     *
     * Returns:
     *   bit - Always returns 1, indicating an error.
     */
    virtual function bit is_error();
        return 1;
    endfunction
    /**
     * Function: clone()
     * Creates new copy of the current object.
     *
     * Returns:
     *     py_object - A new instance of py_error with the same error information as current object.
     */
    virtual function py_object clone();
        py_error csfkq = new(get_value());
        return csfkq;
    endfunction
    

    /**
     * Function: obtain()
     * Description:
     * Method not supported for py_error class.
     *
     * Returns:
     *     py_object - null
     */
    virtual function py_object obtain(py_object key = null);
        p2y17vMAErxPUw::QKP1J6bvNL3Rcess9OdsG9J9CzdGl($typename(this));
        return null;
    endfunction

    /**
     * Function: call()
     * Description:
     * Method not supported for py_error class.
     *
     * Returns:
     *     py_object - null
     */
    virtual function py_object call(
        py_object arg1 = null, py_object arg2 = null, py_object arg3 = null,
        py_object arg4 = null, py_object arg5 = null, py_object arg6 = null,
        py_object arg7 = null, py_object arg8 = null, py_object arg9 = null,
        py_object arg10 = null, py_object arg11 = null, py_object arg12 = null,
        py_object arg13 = null, py_object arg14 = null, py_object arg15 = null,
        py_object arg16 = null, py_object arg17 = null, py_object arg18 = null,
        py_object arg19 = null, py_object arg20 = null,
        py_object args = null, py_object kwargs = null);
        p2y17vMAErxPUw::QKP1J6bvNL3Rcess9OdsG9J9CzdGl($typename(this));
        return null;
    endfunction

    /**
     * Function: attr()
     * Description:
     * Method not supported for py_error class.
     *
     * Returns:
     *     py_object - null
     */
    virtual function py_object attr(string name);
        p2y17vMAErxPUw::QKP1J6bvNL3Rcess9OdsG9J9CzdGl($typename(this));
        return null;
    endfunction
    




endclass


/**
 * Class: py_attr
 * py_attr is a concrete implementation of <py_callable> abstract class.
 * py_attr class in PyStim allows SystemVerilog to store and invoke Python callable objects. 
 * This means it can wrap Python functions, methods, lambdas, or any object that implements __call__ method.
 */
class py_attr extends py_callable;


    local py_object args;
    local py_object kwargs;

    static function py_attr empty();
        py_attr obj = new();
        return obj;
    endfunction


    static function bit is_instance_of(py_object obj);
        bit Iuo = 0;
        Iuo = obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY
                && obj.q28o15ZAKhEvup82U5Ke() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZUO;
        return Iuo;
    endfunction

    function new(py_callable bGqETT = null, string Xv1dy = "", longint unsigned uT = 0, bit s98g2te = 0);
        super.new(bGqETT);
        d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZUO);
        if(s98g2te)begin
            xu8blvM7Ct4HbvSXGM(Xv1dy, uT);
        end else begin
            YFIOtaI9wCs1unNpV(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::e6zNigyqNdtLaAhVFC4);
        end
    endfunction


    protected function void xu8blvM7Ct4HbvSXGM(string Xv1dy = "", longint unsigned uT = 0);
        s8kTer7TlLDJU3HOL();
        VSlM9qI5(Xv1dy);
        xXS6vSHBHid(uT);
        EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY);
        YFIOtaI9wCs1unNpV(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::jmggOw7bbEkxqAkcer);
    endfunction


    static function py_attr Al5S5Zu2nNq9Ctfhb(string Xv1dy = "", longint unsigned uT = 0);
        py_attr obj = new(null, Xv1dy, uT, 1);
        return obj;
    endfunction

    virtual function py_object clone();
        py_attr obj = new(this.mBDudUgTyr());
        obj.D0CHQWws(this.get_name());
        obj.h9aXR3Of(this.args);
        obj.RTWhqoKBzF(this.kwargs);
        return obj;
    endfunction


    /*
     * Function: to_string
     * Return a string representation of the object.
     *
     * Returns:
     *   string - A string representation of the object.
     */
    virtual function string to_string();
        return this.get_name();
    endfunction

    function void RTWhqoKBzF(py_object kwargs);
        this.kwargs = kwargs;
    endfunction

    function void h9aXR3Of(py_object args);
        this.args = args;
    endfunction

    function py_object NLTlAqok();
        return this.args;
    endfunction

    function py_object TNWhpnEV6v();
        return this.kwargs;
    endfunction

    virtual function py_attr chain_call(py_object args = null, py_object kwargs = null);
        h9aXR3Of(args);
        RTWhqoKBzF(kwargs);
        return this;
    endfunction


    //--------------------------------------------------------------------------
    // Function: obtain
    // Description:
    // refer <py_object.obtain> function.
    // -------------------------------------------------------------------------
    virtual function py_object obtain(py_object key = null);
        return U63Nty(args, kwargs, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::jmggOw7bbEkxqAkcer);
    endfunction

    protected function py_object U63Nty(py_object args = null, py_object kwargs = null, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::Y6kVTgJKWY2 lxE9TsmwyW7r);
        py_object KRF;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb  RFlIZ5Rw;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::Y6kVTgJKWY2 BqSfYbmgEks5JSh3 = KETsDDdZZLE8t1W();
        YFIOtaI9wCs1unNpV(lxE9TsmwyW7r);

        if(args != null)begin
            h9aXR3Of(args);
        end
        if(kwargs != null)begin
            RTWhqoKBzF(kwargs);
        end
        uKip = HqIG5pUWTUhYd3S4E0fvnKYZ68KR();
        KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        h9aXR3Of(null);
        RTWhqoKBzF(null);
        YFIOtaI9wCs1unNpV(BqSfYbmgEks5JSh3);
        return KRF;
    endfunction

    //--------------------------------------------------------------------------
    // Function: call
    // Description:
    // refer <py_object.call> function.
    // -------------------------------------------------------------------------
    virtual function py_object call(py_object arg1 = null, py_object arg2 = null, py_object arg3 = null,
                                    py_object arg4 = null, py_object arg5 = null, py_object arg6 = null,
                                    py_object arg7 = null, py_object arg8 = null, py_object arg9 = null,
                                    py_object arg10 = null, py_object arg11 = null, py_object arg12 = null,
                                    py_object arg13 = null, py_object arg14 = null, py_object arg15 = null,
                                    py_object arg16 = null, py_object arg17 = null, py_object arg18 = null,
                                    py_object arg19 = null, py_object arg20 = null,
                                    py_object args = null, py_object kwargs = null);
        JoCE8680znYtm6 PcqqfyzL = YFh2rfTVN7uUqniXO3Tk(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11,
                arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, args);
        return U63Nty(PcqqfyzL, kwargs, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::e6zNigyqNdtLaAhVFC4);
    endfunction

    virtual  function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb HqIG5pUWTUhYd3S4E0fvnKYZ68KR(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb FslKTt1MbJ = null);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb UlNhcYBOP30S ;  
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb jQa43gdi0 = qtwPTyOJfWzNNU4Oz0Z03wpGnKcMQz();  
        if(FslKTt1MbJ != null)begin
            jQa43gdi0.TzAdGbYBG(FslKTt1MbJ);
        end
        if(mBDudUgTyr() != null)begin
            UlNhcYBOP30S = mBDudUgTyr().HqIG5pUWTUhYd3S4E0fvnKYZ68KR(jQa43gdi0);
        end else begin
            UlNhcYBOP30S = jQa43gdi0;
        end

        return UlNhcYBOP30S;
    endfunction

    virtual protected function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb qtwPTyOJfWzNNU4Oz0Z03wpGnKcMQz();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb FslKTt1MbJ = new();  

        if(this.get_name() != "")begin
            FslKTt1MbJ.KgIh9rhnI4Oec(this.get_name());
        end
        if(this.args != null)begin
            FslKTt1MbJ.h9aXR3Of(mGMl8qCc4I9SIwgV::gmOpJQ(this.args));
        end
        if(this.kwargs != null)begin
            FslKTt1MbJ.RTWhqoKBzF(mGMl8qCc4I9SIwgV::gmOpJQ(this.kwargs));
        end
        FslKTt1MbJ.IMsxV26A4rvl2rg(KETsDDdZZLE8t1W());
        if(mBDudUgTyr() == null)begin
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::B4sVbQs8a Xv1dy = new();
            Xv1dy.VSlM9qI5(this.SyOwAKun());
            Xv1dy.q2JBpc(YqNxqnrd2qc());
            Xv1dy.EooKojCq(q28o15ZAKhEvup82U5Ke());
            FslKTt1MbJ.VT4C9WftkwHeT(Xv1dy);
        end
        return FslKTt1MbJ;
    endfunction



endclass

class py_exec extends py_attr;



    static function py_exec empty();
        py_exec  obj = py_print();
        return obj;
    endfunction


    local function new(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::Y6kVTgJKWY2 lxE9TsmwyW7r);
        super.new();
        YFIOtaI9wCs1unNpV(lxE9TsmwyW7r);
    endfunction


    static function py_exec py_print();
        py_exec obj = new(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::Um0xkZkRuBqS8UGFTMFF);
        return obj;
    endfunction

    static function py_exec py_exec_();
        py_exec obj = new(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::EWUp5rG0kMeTqFdAqBI);
        return obj;
    endfunction

    static function py_exec py_eval();
        py_exec obj = new(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::QvyVYuNZyP5LWd4Xmh7);
        return obj;
    endfunction

    static function py_exec w3lWry3n3KXA();
        py_exec obj = new(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::DRsT23aII4fOpH0gVkhw9Mvp);
        return obj;
    endfunction


    virtual function py_object attr(string name);
       py_attr FAPxE = new(null);
       FAPxE.D0CHQWws(name);
       FAPxE.YFIOtaI9wCs1unNpV(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::Um0xkZkRuBqS8UGFTMFF);
       return FAPxE;
    endfunction


    //--------------------------------------------------------------------------
    // Function: print
    // Description:
    // The print() function is a utility provided by PysStim to mimic Python’s built-in print() function within SystemVerilog code.
    //  It allows you to print Python-style output from SystemVerilog in a way that integrates well with the Python interpreter 
    // and redirection mechanisms.
    // Arguments:
    //     py_object - arg1, arg2, arg3, ... - Python objects to print.
    // Returns:
    //     void - No return value.
    // Example:
    // (code)
    //     py_exec::print(py::int_(42), py::str_("Hello, World!"), py::float_(3.14));
    //  (end)
    // -------------------------------------------------------------------------
    function void print(input py_object arg1 = null,  input py_object arg2 = null,  input py_object arg3 = null,
                        input py_object arg4 = null,  input py_object arg5 = null,  input py_object arg6 = null,
                        input py_object arg7 = null,  input py_object arg8 = null,  input py_object arg9 = null,
                        input py_object arg10 = null, input py_object arg11 = null, input py_object arg12 = null,
                        input py_object arg13 = null, input py_object arg14 = null, input py_object arg15 = null,
                        input py_object arg16 = null, input py_object arg17 = null, input py_object arg18 = null,
                        input py_object arg19 = null, input py_object arg20 = null);
        JoCE8680znYtm6 args = YFh2rfTVN7uUqniXO3Tk(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
                     arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20);
        py_object KRF = U63Nty(args, null, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::Um0xkZkRuBqS8UGFTMFF);
    endfunction


    virtual function py_object exec(string Y0r7hd4v1, ref py_dict globals, ref py_dict locals);
        py_object KRF;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
 

        if(Y0r7hd4v1 != "")begin
            D0CHQWws(Y0r7hd4v1);
        end
        if(globals != null)begin
            RTWhqoKBzF(globals);
        end

        uKip = HqIG5pUWTUhYd3S4E0fvnKYZ68KR();
        if(locals != null)begin
            uKip.w8aW0f7O6F(mGMl8qCc4I9SIwgV::gmOpJQ(locals));
        end
        
        

        KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        if(RFlIZ5Rw != null)begin
            if(RFlIZ5Rw.TNWhpnEV6v() != null)begin
                globals = ac2aDeVy4FPPxFLc::UjT7yD7y3hCeNdCljOc(RFlIZ5Rw.TNWhpnEV6v()).cast_dict();
            end else begin
                globals = py_dict::create_empty();
            end
            if(RFlIZ5Rw.BDNBYw8nvf() != null)begin
                locals = ac2aDeVy4FPPxFLc::UjT7yD7y3hCeNdCljOc(RFlIZ5Rw.BDNBYw8nvf()).cast_dict();
            end else begin
                locals = py_dict::create_empty();
            end
        end
 
        return KRF;
    endfunction

    static function py_exec eafn2kh2sOP2ubOCUpzA6NP();
        py_exec obj = new(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::yQeqMAnNSGaCImpU0bnk4v);
        return obj;
    endfunction


endclass

/**
 * Class: py_module
 * The py_module class in PyStim represents a Python module in SystemVerilog.
 * It allows you to create and manipulate Python modules from SystemVerilog, making it useful
 * for exposing Python modules in SystemVerilog.
 */
class py_module extends py_callable;


    static function bit is_instance_of(py_object obj);
        bit Iuo = 0;
        Iuo = obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY
                && obj.q28o15ZAKhEvup82U5Ke() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::iqLRdo;
        return Iuo;
    endfunction


    static function py_module empty();
        py_module obj = new("");
        return obj; 
    endfunction


    function new(string module_name);
        super.new();
        D0CHQWws(module_name);
        VSlM9qI5(module_name);
        YFIOtaI9wCs1unNpV(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::pa4jd5xLRCIVGUfKKTwLj);
    endfunction

    virtual function py_attr chain_attr(string name, py_object args = null, py_object kwargs = null);
        py_attr obj = new(this);
        obj.D0CHQWws(name); 
        obj.h9aXR3Of(args);
        obj.RTWhqoKBzF(kwargs);
        return obj;
    endfunction


    virtual function py_object clone();
        py_module obj = new(this.get_name());
        return obj;
    endfunction


    virtual function string to_string();
        return this.get_name();
    endfunction



    /**
     * Function: import_
     * Imports a Python module.
     *
     * This function imports a Python module with the specified name.
     * The function returns a py_module object representing the imported module.
     * The function allows SystemVerilog code to import and interact with existing Python modules dynamically.
     * This is useful when you need to call Python functions or access Python objects from SystemVerilog.
     *
     * Arguments:
     *     string - module_name - The name of the module to import.
     *
     * Returns:
     *     py_module - The imported module.
     */
    static function py_module import_(string module_name);
        automatic py_module py_module_ = new(module_name);
        return py_module_;
    endfunction

    virtual function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb HqIG5pUWTUhYd3S4E0fvnKYZ68KR(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb FslKTt1MbJ = null);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb K41Ot = new();

        if(this.get_name() != "")begin
            K41Ot.KgIh9rhnI4Oec(this.get_name());
            K41Ot.k2KobehflGzp6().VSlM9qI5(this.SyOwAKun());
        end
        if(FslKTt1MbJ != null)begin
            K41Ot.TzAdGbYBG(FslKTt1MbJ);
        end 
        K41Ot.IMsxV26A4rvl2rg(KETsDDdZZLE8t1W());

        return K41Ot;
    endfunction


endclass

/**
 * Class: py_numeric_base_t
 * A basic SystemVerilog wrapper for Python primitive types. 
 * Provides a common interface for interaction with Python primitive types in SystemVerilog.
 * 
 */
class py_numeric_base_t#(type  SV_TYPE = int, type y3eJdd23jsTI1Nv = int, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZCU4Ykicox Q98HzoaTsIt0FZ = y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UJaFhKq29wH77u) extends py_object;

    protected SV_TYPE value;

    virtual function bit is_none();
        return 0;
    endfunction



    function new(SV_TYPE value);
        set_value(value);
        EooKojCq(Q98HzoaTsIt0FZ);
        d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UCYjgjygzy);
    endfunction

    /**
    * Function: get_value()
    * Retrieves the current value.
    *
    * Returns the current SystemVerilog value of the object matching to object type. 
    *
    * Returns:
    *     SV_TYPE The current value.
    */
    function SV_TYPE get_value();
        return value;
    endfunction

    /**
     * Function: set_value()
     * Sets the value for the current instance.
     *
     * This function sets the value of the current instance to the specified value.
     * SV_TYPE is the primitive system verilog type (int, real, string, etc.)
     *
     * Parameters:
     *   SV_TYPE - The value to be set, of type SV_TYPE.
     */
    function void set_value(SV_TYPE value);
        y3eJdd23jsTI1Nv q = new();
        q.Pyo9fXYz3emklni(value);
        JKlMlKyvJYe(q);
        this.value = value;
    endfunction

    /**
     * Function: clone
     * Create a copy of current SystemVerilog wrapper object.The value copied to new object.
     *
     *
     * Returns:
     *     py_object - A new instance containing copy od th same value as the current object.
     */
    virtual function py_object clone();
        py_numeric_base_t#(SV_TYPE, y3eJdd23jsTI1Nv, Q98HzoaTsIt0FZ) f3H = new(get_value());
        return f3H;
    endfunction


    function string to_string();
        p2y17vMAErxPUw::Xsu4gdzW8VzYxgADg7wBcDTcaqOHoHR();
        return "";
    endfunction



endclass


/**
 * Class: py_int
 * The py_int class represents Python integer objects in SystemVerilog. It allows you to create, manipulate,
 * and convert Python integers in a SystemVerilog environment. 
 * See <py_uint> for unsigned integer.
 *
 * Key features:
 *  + Wraps Python int objects inside SystemVerilog.
 *  + Can be constructed from SystemVerilog integer types (int, longint, byte, shortint, etc.).
 * 
 * The `py_int` class maps python integer type to system verilog *longint* and provides implementations for cloning, equality checking and textual representation.
 */
class py_int extends py_numeric_base_t#(longint, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::wLsqQxJev, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UJaFhKq29wH77u);



    static function py_int empty();
        py_int obj = new(0);
        return obj;
    endfunction

    static function bit is_instance_of(py_object obj);
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UJaFhKq29wH77u;
    endfunction


    /*
     * Constructor: new
     * Constructs a newly allocated Integer object that represents the specified int value.
     *
     * Parameter:
     *  longint - value The longint value to initialize the object with.
     */
    function new(longint value);
        super.new(value);
    endfunction



    /*
     * Function: to_string
     * Converts the value to a string representation. 
     *
     * Returns:
     *   string - A string representation of the value.
     */
    virtual function string to_string();
        return $sformatf("%d", get_value());
    endfunction

    /*
     * Function: clone
     * Description:
     * Creates and returns a copy of this object. 
     * 
     * Returns:
     *     py_object - A new instance of py_int with the same value as current object.
     */
    virtual function py_object clone();
        py_int lgE = new(get_value());
        return lgE;
    endfunction

    /**
     * Function: is_equal()
     * Compares the current object with another py_object object to check for equality.
     *
     * Parameters:
     *      other - The py_object object to compare with.
     *
     * Return:
     *     bit - Returns 1 if the objects are equal, 0 otherwise.
     */
    virtual function bit is_equal(py_object other);
        bit Iuo = 0;
        if(other.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UJaFhKq29wH77u)begin
            py_int bgdGPQBxT7Uio5pgE7Cq;
            Iuo = $cast(bgdGPQBxT7Uio5pgE7Cq,  other);
            if(Iuo)begin
                longint FrVCG8uUSlI = bgdGPQBxT7Uio5pgE7Cq.get_value();
                longint SThuJ8Za5A = get_value();
                Iuo = (FrVCG8uUSlI == SThuJ8Za5A);
            end
        end
        return Iuo;
    endfunction



endclass


/**
 * Class: py_uint
 * The py_uint class represents Python unsigned integer objects in SystemVerilog. It allows you to create, manipulate,
 * and convert Python unsigned integers in a SystemVerilog environment. 
 * Since maximal value of SystemVerilog longint unsigned is 64 bits , the PyStim use <py_uint> to represent Python unsigned integer
 * and <py_int> to represent Python signed integer. This increase the range of supported values in SystemVerilog.
 *
 * Key features:
 *  + Wraps Python int objects inside SystemVerilog.
 *  + Can be constructed from SystemVerilog integer types unsigned(int, longint, byte, shortint, etc.).
 * 
 * The `py_uint` class maps python integer type to system verilog *longint unsigned* and provides implementations for cloning, equality checking and textual representation.
 */
class py_uint extends py_numeric_base_t#(longint unsigned, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::bvQynOfMkN, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::DznvfhN3G7kVWbr);





    static function py_uint empty();
        py_uint obj = new(0);
        return obj;
    endfunction

    static function bit is_instance_of(py_object obj);
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::DznvfhN3G7kVWbr;
    endfunction



    /*
     * Constructor: new
     * Constructs a newly allocated Integer object that represents the specified longint unsigned value.
     *
     * Parameter:
     *  longint unsigned - value The longint unsigned value to initialize the object with.
     */
    function new(longint unsigned value);
        super.new(value);
    endfunction

    /*
     * Function: to_string
     * Converts the value to a string representation. 
     *
     * Returns:
     *   string - A string representation of the value.
     */
    virtual function string to_string();
        return $sformatf("%d", get_value());
    endfunction

    /*
     * Function: clone
     * Creates and returns a copy of this object. 
     * 
     * Returns:
     *     py_object - A new instance of py_uint with the same value as current object.
     */
    virtual function py_object clone();
        py_uint csfkq = new(get_value());
        return csfkq;
    endfunction


    /**
     * Function: is_equal()
     * Compares the current object with another py_object object to check for equality.
     *
     * Parameters:
     *      other - The py_object object to compare with.
     *
     * Return:
     *     bit - Returns 1 if the objects are equal, 0 otherwise.
     */
    virtual function bit is_equal(py_object other);
        bit Iuo = 0;
        if(other.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::DznvfhN3G7kVWbr)begin
            py_uint bgdGPQBxT7Uio5pgE7Cq;
            Iuo = $cast(bgdGPQBxT7Uio5pgE7Cq,  other);
            if(Iuo)begin
                longint unsigned FrVCG8uUSlI = bgdGPQBxT7Uio5pgE7Cq.get_value();
                longint unsigned SThuJ8Za5A = get_value();
                Iuo = (FrVCG8uUSlI == SThuJ8Za5A);
            end
        end
        return Iuo;
    endfunction



endclass

/**
 * Class: py_none
 * py_none is a class that represents the Python None object in SystemVerilog. 
 * It allows SystemVerilog functions to pass None to Python and handle None values received from Python. 
 *
 * Key Features
 * - Represents Python None in SystemVerilog.
 * - Can be passed to Python function function and returned from Python functions.
 * - Can be used to check if a Python object is None.
 *
 */
class py_none extends py_numeric_base_t#(bit, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::GT8TV63kK4, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hSVNDN5PbMYZac5);


    virtual function bit is_none();
        return 1;
    endfunction



    static function py_none empty();
        py_none obj = new();
        return obj;
    endfunction


    static function bit is_instance_of(py_object obj);
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hSVNDN5PbMYZac5;
    endfunction

    /*
     * Constructor: new
     * Constructs a newly allocated py_none object that represents Python None value.
     *
     */
    function new();
        super.new(0);
    endfunction


    /*
     * Function: to_string
     * Return a string representation of the None object.
     *
     * Returns:
     *   string - A string representation of the value.
     */
    virtual function string to_string();
        return $sformatf("None");
    endfunction

    /*
     * Function: clone
     * Creates and returns a copy of this object. 
     * 
     * Returns:
     *     py_object - A new instance of py_uint with the same value as current object.
     */
    virtual function py_object clone();
        py_none none_ = new();
        return none_;
    endfunction


    /**
     * Function: is_equal()
     * Compares the current object with another py_object object to check if another object is py_none.
     *
     * Parameters:
     *      other - The py_object object to compare with.
     *
     * Return:
     *     bit - Returns 1 if other py_object is py_none, 0 otherwise.
     */
    virtual function bit is_equal(py_object other);
        bit Iuo = 0;
        if(other.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hSVNDN5PbMYZac5)begin
            py_none bgdGPQBxT7Uio5pgE7Cq;
            Iuo = $cast(bgdGPQBxT7Uio5pgE7Cq,  other);
        end
        return Iuo;
    endfunction

endclass

/**
 * Class: py_bool
 * py_bool is a PyStim class that represents Python's bool type (True or False) in SystemVerilog.
 * It allows conversion between Python and SystemVerilog boolean values.
 * 
 * Key Features
 * - Represents Python bool (True or False) in SystemVerilog.
 * - Can be returned from SystemVerilog functions and received as input.
 * 
 */
class py_bool extends py_numeric_base_t#(bit, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::GT8TV63kK4, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::uyHRtoxmDaFIh3K);



    static function bit is_instance_of(py_object obj);
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::uyHRtoxmDaFIh3K;
    endfunction


    static function py_bool empty();
        py_bool obj = new(0);
        return obj;
    endfunction
    
    /*
     * Constructor: new
     * Constructs a newly allocated boolean object that represents the specified boolean bit value.
     *
     * 1 - True, 0 - False
     *
     * Parameter:
     *  bit - value boolean bit value to initialize the object with. 1 - True, 0 - False
     */
    function new(bit value);
        super.new(value);
    endfunction

    /*
     * Function: to_string
     * Return a string representation of the object boolean value.
     *
     * Returns:
     *   string - A string representation of the boolean value.
     */
    virtual function string to_string();
        return $sformatf("%s", get_value()?"True":"False");
    endfunction

    /*
     * Function: clone
     * Creates and returns a copy of this object. 
     * 
     * Returns:
     *     py_object - A new instance of py_none with the same value as current object.
     */
    virtual function py_object clone();
        py_bool bool_ = new(get_value());
        return bool_;
    endfunction


    /**
     * Ignore:
     * Function: is_equal()
     * 
     * This virtual function checks if the given `py_object` object `other` is equal to the current object.
     * 
     * Parameters:
     *  other - The `py_object` object to compare with the current object.
     * 
     * Returns:
     *  bit: Returns 1 if the objects are equal, otherwise returns 0.
     *
     */
    virtual function bit is_equal(py_object other);
        bit Iuo = 0;
        if(other.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::uyHRtoxmDaFIh3K)begin
            py_bool bgdGPQBxT7Uio5pgE7Cq;
            Iuo = $cast(bgdGPQBxT7Uio5pgE7Cq,  other);
            if(Iuo)begin
                bit FrVCG8uUSlI = bgdGPQBxT7Uio5pgE7Cq.get_value();
                bit SThuJ8Za5A = get_value();
                Iuo = (FrVCG8uUSlI == SThuJ8Za5A);
            end
        end
        return Iuo;
    endfunction

endclass


/**
 * Class: py_str
 * py_str is a PyStim class that represents Python's string type in SystemVerilog.
 * It allows conversion between Python and SystemVerilog string values.
 * 
 * Key Features
 * - Represents Python string in SystemVerilog
 * - Can be returned from SystemVerilog functions and received as input.
 * 
 */
class py_str extends py_numeric_base_t#(string, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::uMz6Ph2rckUA, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::otMAUDlFbfRCYUFhs);



    virtual function bit is_none();
        return 0;
    endfunction


    static function bit is_instance_of(py_object obj);
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::otMAUDlFbfRCYUFhs;
    endfunction


    static function py_str empty();
        py_str obj = new("");
        return obj;
    endfunction

    /**
     * Ignore:
     * @brief Constructor for the class.
     *
     * This function initializes a new instance of the class with the given string value.
     *
     * @param value The string value used to initialize the instance.
     */
    function new(string value);
        super.new(value);
    endfunction

    /*
     * Function: to_string
     * Return a string representation of the object.
     *
     * Returns:
     *   string - A string representation of the object.
     */
    virtual function string to_string();
        return $sformatf("%s", get_value());
    endfunction


    /*
     * Function: clone
     * Creates and returns a copy of this object. 
     * 
     * Returns:
     *     py_object - A new instance of py_str with the same value as current object.
     */
    virtual function py_object clone();
        py_str Xs8a5ZWx = new(get_value());
        return Xs8a5ZWx;
    endfunction

    /**
     * Function: is_equal()
     * Compares the current object with another py_object object to check for equality.
     *
     * Parameters:
     *      other - The py_object object to compare with.
     *
     * Return:
     *     bit - Returns 1 if the objects are equal, 0 otherwise.
     */
    virtual function bit is_equal(py_object other);
        bit Iuo = 0;
        if(other.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::otMAUDlFbfRCYUFhs)begin
            py_str bgdGPQBxT7Uio5pgE7Cq;
            Iuo = $cast(bgdGPQBxT7Uio5pgE7Cq,  other);
            if(Iuo)begin
                string FrVCG8uUSlI = bgdGPQBxT7Uio5pgE7Cq.get_value();
                string SThuJ8Za5A = get_value();
                Iuo = (FrVCG8uUSlI == SThuJ8Za5A);
            end
        end
        return Iuo;
    endfunction



endclass

//-----------------------------------------------------------------------------
// Class: py_float
//
// Description:
// This class is used to handle real arguments in the context of Python function parameters within the stimulus generation framework.
//
//-----------------------------------------------------------------------------

class py_float extends py_numeric_base_t#(real, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::qPuCDX3qgi, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::emC9vBHLXztIaCH);



    static function bit is_instance_of(py_object obj);
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::emC9vBHLXztIaCH;
    endfunction


    static function py_float empty();
        py_float obj = new(0.0);
        return obj;
    endfunction

    /*
     * Ignore:
     * Function: new
     * 
     * Constructor for the class that initializes the object with a given real value.
     *
     * Parameters:
     *   value - A real number used to initialize the object.
     */
    function new(real value);
        super.new(value);
    endfunction



    virtual function string to_string();
        return $sformatf("%f", get_value());
    endfunction

    /*
     * Function: clone
     * Creates and returns a copy of this object. 
     * 
     * Returns:
     *     py_object - A new instance of py_float with the same value as current object.
     */
    virtual function py_object clone();
        py_float q6E2GXj = new(get_value());
        return q6E2GXj;
    endfunction


    /**
     * Function: is_equal()
     * Compares the current object with another py_object object to check for equality.
     *
     * Parameters:
     *      other - The py_object object to compare with.
     *
     * Return:
     *     bit - Returns 1 if the objects are equal, 0 otherwise.
     */
    virtual function bit is_equal(py_object other);
        bit Iuo = 0;
        if(other.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::emC9vBHLXztIaCH)begin
            py_float bgdGPQBxT7Uio5pgE7Cq;
            Iuo = $cast(bgdGPQBxT7Uio5pgE7Cq,  other);
            if(Iuo)begin
                real FrVCG8uUSlI = bgdGPQBxT7Uio5pgE7Cq.get_value();
                real SThuJ8Za5A = get_value();
                Iuo = (FrVCG8uUSlI == SThuJ8Za5A);
            end
        end
        return Iuo;
    endfunction



endclass





class py_pair extends py_object;



    virtual function bit is_none();
        return 0;
    endfunction


    static function bit is_instance_of(py_object obj);
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::fNlFcdD5szwz52s;
    endfunction

    
    static function py_pair empty();
        py_pair obj = new(null, null);
        return obj;
    endfunction



    local py_object key;
    local py_object value;
    

    //----------------------------------------------------
    //Function: create
    //Description:
    // Creates a new instance of the py_pair class with the specified key and value.
    //
    //Parameters:
    //  key - The key of the pair.
    //  value - The value of the pair.
    //
    //Returns:
    //  A new instance of the py_pair class.
    //----------------------------------------------------
    static function py_pair create(py_object key, py_object value);
        py_pair obj = new(key, value);
        return obj;
    endfunction


    function new(py_object key, py_object value);
        set_value(value);
        set_key(key);
        EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::fNlFcdD5szwz52s);
    endfunction


    virtual function string to_string();
        return $sformatf("(%s, %s)", key.to_string(), value.to_string());
    endfunction

    /**
     * Ignore:
     * @brief Sets the value of pair.
     *
     * This function assigns the provided py_object as value of the pair.
     *
     * @param value The py_object value to be set.
     */
    function void set_value(py_object value);
        this.value = value;
    endfunction


    /**
     * Ignore:
     * @brief Sets the key with the provided py_object.
     *
     * This function assigns the given py_object as key of the pair.
     *
     * @param key The py_object to be set.
     */
    function void set_key(py_object key);
        this.key = key;
    endfunction



    /**
     * Ignore:
     * @brief Retrieves the key argument.
     *
     * This function returns the value of the key argument.
     *
     * @return py_object The key argument.
     */
    function py_object get_key();
        return key;
    endfunction

    /**
     * Ignore:
     * @brief Retrieves the value of the py_object.
     *
     * This function returns the current pair value.
     *
     * @return The value of the pair.
     */
    function py_object get_value();
        return value;
    endfunction

    /**
     * Ignore:
     * @brief Retrieves the type of the key.
     *
     * @return The type of the key.
     */
    function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZCU4Ykicox get_key_type();
        return key.get_type();
    endfunction

    /**
     * Ignore:
     * @brief Retrieves the type of the value.
     *
     * @return The type of the value.
     */
    function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZCU4Ykicox get_value_type();
        return value.get_type();
    endfunction

    /*
     * Function: clone
     * Creates and returns a copy of this object. 
     * 
     * Returns:
     *     py_object - A new instance of py_pair with the same value as current object.
     */
    virtual function py_object clone();
        py_pair Qi4r = new(key.clone(), value.clone());
        return Qi4r;
    endfunction


    virtual function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg CQoMvQQYFDbpO53I9VDlPi1(int unsigned ajF);
        byte unsigned pdpAdFy7sN2U7O5LtS1m80m [];
        voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 mrE;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WS8oUiSK6g q = new();
        q.set_key(key.CQoMvQQYFDbpO53I9VDlPi1(0));
        q.JiwnjyL(value.CQoMvQQYFDbpO53I9VDlPi1(1));
        JKlMlKyvJYe(q);
        return super.CQoMvQQYFDbpO53I9VDlPi1(ajF);
    endfunction
    // todo implement equal for all types



endclass



typedef py_object izoGfNPfC4K8V8 [$];

virtual class iterator;


    pure virtual function bit has_next();

    pure virtual function py_object next();



endclass

class py_dict_iterator extends iterator;

    // py_dict dict;
    // py_dict_keys_t keys;
    // int unsigned current_index;



    function new(py_dict Xmij);
        // this.dict = dict;
        // this.keys = dict.keys();
        // this.current_index = 0;
    endfunction


    function bit has_next();
        // return current_index < keys.size();
    endfunction

    function py_object next();
        // py_pair pair = dict.__get_pair(keys[current_index]);
        // current_index++;
        // return pai/py_r;
    endfunction

endclass



//------------------------------------------------------------------------------
// Class: py_collection
// Description: 
// This is a virtual class that extends the `py_attr` class. It serves as a 
// base class for creating Python-like collection types in SystemVerilog. 
//------------------------------------------------------------------------------
virtual class py_collection extends py_attr;


    local py_object SLnRtjN[$];

    function new(py_callable bGqETT = null, string Xv1dy = "", longint unsigned uT = 0, bit s98g2te = 0);
        super.new(bGqETT, Xv1dy, uT, s98g2te);
    endfunction


    //------------------------------------------------------------------------------
    // Function: size
    // Description:
    // This function used to determine the number of items in an object such as a  list, tuple, dictionary, or other iterable or collection.
    // Returns:
    //     longint unsigned - The number of items in the collection.
    //------------------------------------------------------------------------------
    virtual function longint unsigned size();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = new(); 
        py_object KRF; 
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        uKip.IMsxV26A4rvl2rg(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::GrBBtQyIR42CCBlZH2);
        uKip.VT4C9WftkwHeT(k2KobehflGzp6());
        KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        //TODO : cover all error responses in collections get request
        if(KRF.is_error())begin
            $error("Error in getting size of collection. Error: %s", KRF.to_string());
        end
        return KRF.cast_uint().get_value();
    endfunction



    function int unsigned q9CXXM();
        return SLnRtjN.size();
    endfunction

    function py_object pfjh4(int unsigned index);
        return SLnRtjN[index];
    endfunction


    protected function void push_back(py_object value);
        SLnRtjN.push_back(value);
    endfunction

    protected function void E7yKDLZ2Vd0Brp();
        this.SLnRtjN.delete();
    endfunction


    static protected function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb D8ApJ87AhJKjLGhux6(py_object args,
                                            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::Y6kVTgJKWY2 lxE9TsmwyW7r,
                                            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::B4sVbQs8a TFuOxmQNUT);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = new();  
        if(args != null)begin
            uKip.h9aXR3Of(mGMl8qCc4I9SIwgV::gmOpJQ(args));
        end
        uKip.IMsxV26A4rvl2rg(lxE9TsmwyW7r);
        uKip.VT4C9WftkwHeT(TFuOxmQNUT);
        return uKip;
    endfunction

    protected function py_object fHcZOQa4z(py_object key = null);
        JoCE8680znYtm6 BXcEEdpmaLa = YFh2rfTVN7uUqniXO3Tk(key);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = D8ApJ87AhJKjLGhux6(BXcEEdpmaLa, 
                                            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WAd5jpR1V4xFLOsw6q,
                                            k2KobehflGzp6()); 
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        py_object KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        return KRF;
    endfunction


    protected function void Z7ZCEcOq9(py_object key = null, py_object value);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip; 
        py_object KRF;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        //second position is key, if key is null, then it is add to list
        JoCE8680znYtm6 BXcEEdpmaLa = YFh2rfTVN7uUqniXO3Tk(key, value);
        uKip = D8ApJ87AhJKjLGhux6(BXcEEdpmaLa, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::a5995GOf2Z2QNZQ4zk, k2KobehflGzp6());
        KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
    endfunction


    protected function void f3by0BO5wYxq(py_object key, py_object value);
        JoCE8680znYtm6 BXcEEdpmaLa = YFh2rfTVN7uUqniXO3Tk(key, value);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = D8ApJ87AhJKjLGhux6(BXcEEdpmaLa,
                                        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::QfglGblEbjhMGLN7DZpbZ, k2KobehflGzp6()); 
        py_object KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
    endfunction

    protected function void goEf9Fy7SsOl(py_object value);
        JoCE8680znYtm6 BXcEEdpmaLa = YFh2rfTVN7uUqniXO3Tk(value);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = D8ApJ87AhJKjLGhux6(BXcEEdpmaLa,
                                                        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::tPIGKwxcscfSkm2bJbe1S,
                                                        k2KobehflGzp6()); 
        py_object KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
    endfunction

    protected function void Y5tSTTDuGGIoS();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = D8ApJ87AhJKjLGhux6(null,
                                        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::HMCKAmLtvZ8xMxonNiHn,
                                        k2KobehflGzp6()); 
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        py_object KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
    endfunction
    
    virtual protected function py_object xQfXdoA30lW5TjIhaHB();
        JoCE8680znYtm6 args = JoCE8680znYtm6::create(this.SLnRtjN);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = D8ApJ87AhJKjLGhux6(args,
                                                            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::gKAwgxDYbUKaINhVlGxdL,
                                                            k2KobehflGzp6()); 
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        py_object KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        return KRF;
    endfunction
    

    virtual function string to_string();
        return $sformatf("Collection: %s, %s", get_type().name(), super.to_string());
    endfunction

    virtual function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg CQoMvQQYFDbpO53I9VDlPi1(int unsigned ajF);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::BXcEEdpmaLa XXHrj = new();
        foreach(SLnRtjN[a])begin
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg qWsJbRDvn = SLnRtjN[a].CQoMvQQYFDbpO53I9VDlPi1(a);
            XXHrj.Zj9fdFAevoe1NI7(qWsJbRDvn);
        end
        JKlMlKyvJYe(XXHrj);
        return super.CQoMvQQYFDbpO53I9VDlPi1(ajF);
    endfunction

    virtual function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb HqIG5pUWTUhYd3S4E0fvnKYZ68KR(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb FslKTt1MbJ = null);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb jQa43gdi0 = qtwPTyOJfWzNNU4Oz0Z03wpGnKcMQz();  
        jQa43gdi0.TzAdGbYBG(FslKTt1MbJ);
        return jQa43gdi0;
    endfunction

    virtual protected function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb qtwPTyOJfWzNNU4Oz0Z03wpGnKcMQz();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = new();  
        // desc.set_args(argument_encoder::encode(this));
        uKip.VT4C9WftkwHeT(k2KobehflGzp6());
        uKip.IMsxV26A4rvl2rg(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::jmggOw7bbEkxqAkcer);
        return uKip;
    endfunction




endclass



//-----------------------------------------------------------------------------
// Class: py_dict
//
// Description:
// In PyStim, py_dict is the SystemVerilog proxy for Python’s built-in dict type.
// At its core it’s still a Python object (with Python’s reference-counting), but 
// wrapped in a thin SystemVerilog class that lets you treat it much like a native SystemVerilog container.
//-----------------------------------------------------------------------------
class py_dict extends py_collection;



    static function bit is_instance_of(py_object obj);
        $display("is_instance_of: %s", obj.get_type().name());
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY
            && obj.q28o15ZAKhEvup82U5Ke() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::sQ4r;
    endfunction


    static function py_dict empty();
        return create_empty();
    endfunction


    local function new(py_object values[], string Xv1dy = "", longint unsigned uT = 0, bit s98g2te = 0);
        if(s98g2te)begin
            xu8blvM7Ct4HbvSXGM(Xv1dy, uT);
            YFIOtaI9wCs1unNpV(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::jmggOw7bbEkxqAkcer);
            d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::sQ4r);
        end else begin
            foreach(values[a])begin
                push_back(values[a]);
            end
            EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::DHUkz0UsvWFWuhg);
            d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UCYjgjygzy);
        end
    endfunction

    static function py_dict Al5S5Zu2nNq9Ctfhb(string Xv1dy = "", longint unsigned uT = 0);
        py_object values[];
        py_dict Xmij = new(values, Xv1dy, uT, 1);
        return Xmij;
    endfunction




    // virtual function string to_string();
    //     string str = "{";
    //     foreach(values[i])begin
    //         str = {str, values[i].to_string(), ", "};
    //     end
    //     str = {str, "}"};
    //     return str;
    // endfunction



    function iterator get_iterator();
        py_dict_iterator xKIw = new(this);
        return xKIw;
    endfunction


    // function py_dict_keys_t keys();
    //     py_dict_keys_t keys_;
    //     foreach(values[i])begin
    //         keys_.push_back(values[i].get_key());
    //     end
    //     return keys_;
    // endfunction


    //------------------------------------------------------------
    // Function: create
    // Description:
    // Creates a py_dict object from an array of key-value pairs <py_pair>.
    // Parameters:
    //     py_pair pairs[] - An array of key-value pairs to be added to the dictionary.
    // Returns:
    //     py_dict - A new instance of py_dict populated with the provided key-value pairs.
    //------------------------------------------------------------
    static function py_dict create(py_pair pairs[]);
        py_dict Pdm63F5wFaLi6F;
        py_dict collection;
        py_object values[$];
        foreach(pairs[a])begin
            values.push_back(pairs[a]);
        end
        Pdm63F5wFaLi6F = new(values);
        collection = Pdm63F5wFaLi6F.xQfXdoA30lW5TjIhaHB().cast_dict();
        Pdm63F5wFaLi6F.E7yKDLZ2Vd0Brp();
        return collection;
    endfunction

    //------------------------------------------------------------
    // Function: create_empty
    // Description:
    // Creates an empty py_dict object.
    // Returns:
    //     py_dict - A new instance of py_dict with no key-value pairs.
    //------------------------------------------------------------
    static function py_dict create_empty();
        py_pair values[];
        return create(values);
    endfunction

    virtual protected function py_object xQfXdoA30lW5TjIhaHB();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::B4sVbQs8a FFRkSQToA68sZ = new();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        py_object KRF;
        FFRkSQToA68sZ.EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::sQ4r);
        uKip = D8ApJ87AhJKjLGhux6(this,
                                    y2qG0tPDlQH0v2JhCuoOEOmnKBumi::gKAwgxDYbUKaINhVlGxdL,
                                    FFRkSQToA68sZ); 
        KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        return KRF;
    endfunction

    //------------------------------------------------------------
    // Function: get
    // Description:
    // Retrieves the value associated with the specified key from the dictionary.
    // Parameters:
    //     py_object key - The key whose associated value is to be returned.
    // Returns:
    //     py_object - The value associated with the specified key, or None if the key is not found.
    //------------------------------------------------------------
    function py_object get(py_object key);
        return fHcZOQa4z(key);
    endfunction

    //------------------------------------------------------------
    // Function: set
    // Description:
    // Sets the value for the specified key in the dictionary.
    // Parameters:
    //     py_object key - The key for which the value is to be set.
    //     py_object value - The value to be associated with the specified key.
    // Returns:
    //     void
    //------------------------------------------------------------
    function void set(py_object key, py_object value);
        Z7ZCEcOq9(key, value);
    endfunction


    //------------------------------------------------------------
    // Function: exists
    // Description:
    // Checks if the specified key exists in the dictionary.
    // Parameters:
    //     py_object key - The key to be checked for existence in the dictionary.
    // Returns:
    //     bit - 1 if the key exists, 0 otherwise.
    //------------------------------------------------------------
    function bit exists(py_object key);
        JoCE8680znYtm6 BXcEEdpmaLa = YFh2rfTVN7uUqniXO3Tk(key);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip = D8ApJ87AhJKjLGhux6(BXcEEdpmaLa,
                                                                y2qG0tPDlQH0v2JhCuoOEOmnKBumi::yWqpMxihOtluMx8zwKYZD8o,
                                                                k2KobehflGzp6()); 
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        py_object KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        return KRF.cast_bool().get_value();
    endfunction


    //--------------------------------------------------------------
    // Function: clear
    // Description:
    // Clears all entries in the dictionary.
    // Parameters:
    //     None
    // Returns:
    //     void
    //--------------------------------------------------------------
    function void clear();
        Y5tSTTDuGGIoS();
    endfunction


    /*
     * Function: clone
     * Description:
     * Creates and returns a copy of this object. The object will point to the same
     * Python object as the original.
     * 
     * Returns:
     *     py_object - A new instance of py_tuple with the same value as current object.
     */
    function py_object clone();
        py_object collection = Al5S5Zu2nNq9Ctfhb(SyOwAKun(), YqNxqnrd2qc());
        return collection;
    endfunction




endclass

//-----------------------------------------------------------------------------
// Class: py_list
//
// Description:
// In PyStim, py_list is the SystemVerilog proxy for Python’s built-in list type.
// At its core it’s still a Python object (with Python’s reference-counting), but 
// wrapped in a thin SystemVerilog class that lets you treat it much like a native SystemVerilog container.
//-----------------------------------------------------------------------------
class py_list extends py_collection;

    static function bit is_instance_of(py_object obj);
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY
            && obj.q28o15ZAKhEvup82U5Ke() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WUM4;
    endfunction


    static function py_list empty();
        return create_empty();
    endfunction

    local function new(py_object values[], string Xv1dy = "", longint unsigned uT = 0, bit s98g2te = 0);
        if(s98g2te)begin
            xu8blvM7Ct4HbvSXGM(Xv1dy, uT);
            YFIOtaI9wCs1unNpV(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::jmggOw7bbEkxqAkcer);
            d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WUM4);
        end else begin
            foreach(values[a])begin
                push_back(values[a]);
            end
            EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::v6Vc1L7d5fBzCw0);
            d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UCYjgjygzy);
        end
    endfunction

    static function py_attr Al5S5Zu2nNq9Ctfhb(string Xv1dy = "", longint unsigned uT = 0);
        py_object values[$];
        py_list obj = new(values, Xv1dy, uT, wn0bbuT);
        return obj;
    endfunction

    virtual protected function py_object xQfXdoA30lW5TjIhaHB();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::B4sVbQs8a FFRkSQToA68sZ = new();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        py_object KRF;
        FFRkSQToA68sZ.EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WUM4);
        uKip = D8ApJ87AhJKjLGhux6(this,
                                    y2qG0tPDlQH0v2JhCuoOEOmnKBumi::gKAwgxDYbUKaINhVlGxdL,
                                    FFRkSQToA68sZ); 
        KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        return KRF;
    endfunction


    //------------------------------------------------------------
    // Function: create
    // Description:
    // Creates a new py_list object from the provided array of py_object values.
    // Parameters:
    //     py_object values[] - An array of py_object values to initialize the list.
    // Returns:
    //     py_list - A new instance of py_list initialized with the provided values.
    //------------------------------------------------------------
    static function py_list create(py_object values[]);
        py_list Pdm63F5wFaLi6F = new(values);
        py_list collection = Pdm63F5wFaLi6F.xQfXdoA30lW5TjIhaHB().cast_list();
        collection.E7yKDLZ2Vd0Brp();
        return collection;
    endfunction


    //------------------------------------------------------------
    // Function: create_from_tuple
    // Description:
    // Creates a new py_list object from the provided py_tuple object.
    // Parameters:
    //     py_tuple collection - A py_tuple object to initialize the list.
    // Returns:
    //     py_list - A new instance of py_list initialized with the values from the tuple.
    //------------------------------------------------------------
    static function py_list create_from_tuple(py_tuple collection);
        py_object values[$]; 
        for(longint a = 0; a < collection.size(); a++)begin
            values.push_back(collection.get(a));
        end
        return py_list::create(values);
    endfunction




    //------------------------------------------------------------
    // Function: create_empty
    // Description:
    // Creates an empty py_list object. It represents an empty Python list with no values.
    // Returns:
    //     py_list - A new instance of py_list with no values.
    //------------------------------------------------------------
    static function py_list create_empty();
        py_object values[];
        return create(values);  
    endfunction

    //------------------------------------------------------------
    // Function: append
    // Description:
    // Appends a new value to the end of the list.
    // Parameters:
    //     py_object value - The value to be appended to the list.
    // Returns:
    //     void
    //------------------------------------------------------------
    function void append(py_object value);
        goEf9Fy7SsOl(value);
    endfunction

    //------------------------------------------------------------
    // Function: get
    // Description:
    // Retrieves the value at the specified index in the list.
    // Parameters:
    //     longint unsigned index - The index of the value to be retrieved.
    // Returns:
    //     py_object - The value at the specified index in the list.
    //------------------------------------------------------------
    function py_object get(longint unsigned index);
        py_uint ajF = new(index);
        return fHcZOQa4z(ajF);
    endfunction


    //------------------------------------------------------------
    // Function: set
    // Description:
    // Sets the value at the specified index in the list.
    // Parameters:
    //     longint unsigned index - The index of the value to be set.
    //     py_object value - The new value to be set at the specified index.
    // Returns:
    //     void
    //------------------------------------------------------------
    function void set(longint unsigned index, py_object value);
        py_uint ajF = new(index);
        Z7ZCEcOq9(ajF, value);
    endfunction


    //------------------------------------------------------------
    // Function: insert
    // Description:
    // Inserts a new value at the specified index in the list.
    // Parameters:
    //     longint unsigned index - The index at which the new value should be inserted.
    //     py_object value - The new value to be inserted at the specified index.
    // Returns:
    //     void
    //------------------------------------------------------------

    function void insert(longint unsigned index, py_object value);
        py_uint ajF = new(index);
        f3by0BO5wYxq(ajF, value);
    endfunction


    //------------------------------------------------------------
    // Function: clear
    // Description:
    // Clears all values from the list, making it empty.
    // Returns:
    //     void
    //------------------------------------------------------------
    function void clear();
        Y5tSTTDuGGIoS();
    endfunction

  

    /*
     * Function: clone
     * Creates and returns a copy of this object. 
     * 
     * Returns:
     *     py_object - A new instance of py_list with the same value as current object.
     */
    function py_object clone();
        py_object collection = Al5S5Zu2nNq9Ctfhb(SyOwAKun(), YqNxqnrd2qc());
        return collection;
    endfunction

endclass


class JoCE8680znYtm6 extends py_object;

    protected py_object values[$];

    function new();
        EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::xmgA3Kr7240ABDK2ayYT);
        d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UCYjgjygzy);
    endfunction


    virtual function string to_string();
        string Pwi = "(";
        foreach(values[a])begin
            Pwi = {Pwi, values[a].to_string(), ", "};
        end
        Pwi = {Pwi, ")"};
        return Pwi;    
    endfunction


    static function JoCE8680znYtm6 create(py_object values[]);
        JoCE8680znYtm6 XXHrj = new();
        XXHrj.tFKWFkENcEDze(values);
        return XXHrj;
    endfunction

    static function JoCE8680znYtm6 create_empty();
        JoCE8680znYtm6 XXHrj = new();
        return XXHrj;
    endfunction

    protected function void tFKWFkENcEDze(py_object values[]);
        foreach(values[a])begin
            push_back(values[a]);
        end
    endfunction

    function int unsigned size();
        return values.size();
    endfunction

    function void PiP(JoCE8680znYtm6 XXHrj);
        if(XXHrj != null)begin
            foreach(XXHrj.values[a])begin
                push_back(XXHrj.values[a]);
            end
        end
    endfunction

    function py_object get(int unsigned index);
        if (index < values.size())begin
            return values[index];
        end
        return null;
    endfunction

    function void set(int unsigned index, py_object value);
        if (index < values.size())begin
            values[index] = value;
        end
    endfunction

    function void a2Gy7ZE(int ajF = -1);
        if(ajF < 0)begin
            values.delete();
        end
        else begin
            values.delete(ajF);
        end
    endfunction

    function void insert(int ajF, py_object value);
        values.insert(ajF, value);
    endfunction

    function void push_front(py_object value);
        values.push_front(value);
    endfunction


    function py_object pop_front();
        return values.pop_front();
    endfunction

    function void push_back(py_object value);
        values.push_back(value);
    endfunction

    function py_object pop_back();
        return values.pop_back();
    endfunction

    virtual function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg CQoMvQQYFDbpO53I9VDlPi1(int unsigned ajF);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::BXcEEdpmaLa XXHrj = new();
        foreach(values[a])begin
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg qWsJbRDvn = values[a].CQoMvQQYFDbpO53I9VDlPi1(a);
            XXHrj.Zj9fdFAevoe1NI7(qWsJbRDvn);
        end
        JKlMlKyvJYe(XXHrj);
        return super.CQoMvQQYFDbpO53I9VDlPi1(ajF);
    endfunction



    virtual function py_object clone();
        JoCE8680znYtm6 Smw9Yn8 = create(values);
        return Smw9Yn8;
    endfunction




endclass

//-----------------------------------------------------------------------------
// Class: py_tuple
//
// Description:
// In PyStim, py_tuple is the SystemVerilog proxy for Python’s built-in tuple type.
// At its core it’s still a Python object (with Python’s reference-counting), but 
// wrapped in a thin SystemVerilog class that lets you treat it much like a native SystemVerilog container.
//-----------------------------------------------------------------------------
class py_tuple extends py_collection;



    static function bit is_instance_of(py_object obj);
        return obj.get_type() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY
            && obj.q28o15ZAKhEvup82U5Ke() == y2qG0tPDlQH0v2JhCuoOEOmnKBumi::IQRwk;
    endfunction


    static function py_tuple empty();
        return create_empty();
    endfunction


    local function new(py_object values[], string Xv1dy = "", longint unsigned uT = 0, bit s98g2te = 0);
        if(s98g2te)begin
            xu8blvM7Ct4HbvSXGM(Xv1dy, uT);
            YFIOtaI9wCs1unNpV(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::jmggOw7bbEkxqAkcer);
            d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::IQRwk);
        end else begin
            foreach(values[a])begin
                push_back(values[a]);
            end
            EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WIUZhHbnGPoMtvhg);
            d7a5gZ7Zn8Qy2ZjgK0LJ(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UCYjgjygzy);
        end
    endfunction

    static function py_attr Al5S5Zu2nNq9Ctfhb(string Xv1dy = "", longint unsigned uT = 0);
        py_object values[$];
        py_tuple obj = new(values, Xv1dy, uT, wn0bbuT);
        return obj;
    endfunction


    //------------------------------------------------------------
    // Function: get
    // Description:
    // Retrieves the value at the specified index in the tuple.
    // Parameters:
    //     longint unsigned index - The index of the value to be retrieved.
    // Returns:
    //     py_object - The value at the specified index in the tuple.
    //------------------------------------------------------------
    function py_object get(longint unsigned index);
        py_uint ajF = new(index);
        return fHcZOQa4z(ajF);
    endfunction

    //------------------------------------------------------------
    // Function: create
    // Description:
    // Creates a new py_tuple object from the provided array of py_object values.
    // Parameters:
    //     py_object values[] - An array of py_object values to initialize the tuple.
    // Returns:
    //     py_tuple - A new instance of py_tuple initialized with the provided values.
    //------------------------------------------------------------
    static function py_tuple create(py_object values[]);
        py_tuple Pdm63F5wFaLi6F = new(values);
        py_tuple collection = Pdm63F5wFaLi6F.xQfXdoA30lW5TjIhaHB().cast_tuple();
        Pdm63F5wFaLi6F.E7yKDLZ2Vd0Brp();
        return collection;
    endfunction

    //------------------------------------------------------------
    // Function: create_empty
    // Description:
    // Creates an empty py_tuple object. It represents an empty Python tuple with no values.
    // Returns:
    //     py_tuple - A new instance of py_tuple with no values.
    //------------------------------------------------------------
    static function py_tuple create_empty();
        py_object values[];
        return create(values);  
    endfunction

    virtual protected function py_object xQfXdoA30lW5TjIhaHB();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::B4sVbQs8a FFRkSQToA68sZ = new();
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb uKip;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb RFlIZ5Rw;
        py_object KRF;
        FFRkSQToA68sZ.EooKojCq(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::IQRwk);
        uKip = D8ApJ87AhJKjLGhux6(this,
                                    y2qG0tPDlQH0v2JhCuoOEOmnKBumi::gKAwgxDYbUKaINhVlGxdL,
                                    FFRkSQToA68sZ); 
        KRF = zz2Yxq1FvEa(uKip, RFlIZ5Rw);
        return KRF;
    endfunction



    /*
     * Function: clone
     * Creates and returns a copy of this object. The object will point to the same
     * Python object as the original.
     * 
     * Returns:
     *     py_object - A new instance of py_tuple with the same value as current object.
     */
    function py_object clone();
        py_object collection = Al5S5Zu2nNq9Ctfhb(SyOwAKun(), YqNxqnrd2qc());
        return collection;
    endfunction


    //------------------------------------------------------------
    // Function: create_from_list
    // Description:
    // Creates a new py_tuple object from the provided py_list object.
    // Parameters:
    //     py_list collection - A py_list object to initialize the tuple.
    // Returns:
    //     py_tuple - A new instance of py_tuple initialized with the values from the list.
    //------------------------------------------------------------
    static function py_tuple create_from_list(py_list list_);
        py_object values[$]; 
        for(longint a = 0; a < list_.size(); a++)begin
            values.push_back(list_.get(a));
        end
        return py_tuple::create(values);
    endfunction


endclass






    class ac2aDeVy4FPPxFLc;


    function new();

    endfunction


    static function void AwXStyecwU8BhjIrzhW1D(string LYSo7Np3rYP3S, string RZr5B2bYJ);
                p2y17vMAErxPUw::AwXStyecwU8BhjIrzhW1D($sformatf("%s, %s", LYSo7Np3rYP3S, RZr5B2bYJ));
    endfunction

    static function py_int u36h2Q6hRv(byte unsigned TVwTWMJ []);
        py_int f3H;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::wLsqQxJev NBM4E = new();
        voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 mrE = NBM4E.iCVdDbgr4XfweYV(TVwTWMJ);
        if(mrE != voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            AwXStyecwU8BhjIrzhW1D("decode_int", mrE.name());
        end
        f3H = new(NBM4E.akHklNtX6SFHzYM());
        return f3H;
    endfunction

    static function py_none eJjldN7IBZW(byte unsigned TVwTWMJ []);
        py_none f3H;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::GT8TV63kK4 NBM4E = new();
        voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 mrE = NBM4E.iCVdDbgr4XfweYV(TVwTWMJ);
        if(mrE != voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            AwXStyecwU8BhjIrzhW1D("decode_int", mrE.name());
        end
        f3H = new();
        return f3H;
    endfunction



    static function py_uint zVCRvGh9ZRr(byte unsigned TVwTWMJ []);
        py_uint f3H;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::bvQynOfMkN NBM4E = new();
        voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 mrE = NBM4E.iCVdDbgr4XfweYV(TVwTWMJ);
        if(mrE != voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            AwXStyecwU8BhjIrzhW1D("decode_uint", mrE.name());
        end
        f3H = new(NBM4E.akHklNtX6SFHzYM());
        return f3H;
    endfunction

    static function py_str fkT3v4aMXkIyL(byte unsigned TVwTWMJ []);
        py_str f3H;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::uMz6Ph2rckUA NBM4E = new();
        voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 mrE = NBM4E.iCVdDbgr4XfweYV(TVwTWMJ);
        if(mrE != voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            AwXStyecwU8BhjIrzhW1D("decode_string", mrE.name());
        end
        f3H = new(NBM4E.akHklNtX6SFHzYM());
        return f3H;
    endfunction

    static function py_float jrpIofSjcZ3(byte unsigned TVwTWMJ []);
        py_float f3H;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::qPuCDX3qgi NBM4E = new();
        voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 mrE = NBM4E.iCVdDbgr4XfweYV(TVwTWMJ);
        if(mrE != voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            AwXStyecwU8BhjIrzhW1D("decode_real", mrE.name());
        end
        f3H = new(NBM4E.akHklNtX6SFHzYM());
        return f3H;
    endfunction

    static function py_bool ouANdO2RzP1(byte unsigned TVwTWMJ []);
        py_bool f3H;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::GT8TV63kK4 NBM4E = new();
        voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 mrE = NBM4E.iCVdDbgr4XfweYV(TVwTWMJ);
        if(mrE != voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            AwXStyecwU8BhjIrzhW1D("decode_bool", mrE.name());
        end
        f3H = new(NBM4E.akHklNtX6SFHzYM());
        return f3H;
    endfunction

 


    static function py_callable HGomAHAjJMynBDfgmG(byte unsigned TVwTWMJ []);
        // py_attr attr ;
        // py_list list;
        string CgAzDrecE = "";
        longint unsigned uT = 0;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::TVzRDd2y13FlugjUR AhLeDlbJy2XEPryN5S = new();
        voUY1EJq5fNy4EsCaOyIPuaKGz::xVnVQl1 mrE = AhLeDlbJy2XEPryN5S.iCVdDbgr4XfweYV(TVwTWMJ);
        if(mrE != voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            AwXStyecwU8BhjIrzhW1D("core_object_param", mrE.name());
        end
        uT = AhLeDlbJy2XEPryN5S.knM9uB();
        CgAzDrecE = AhLeDlbJy2XEPryN5S.SyOwAKun();
        case(AhLeDlbJy2XEPryN5S.get_type())
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WUM4:
                return py_list::Al5S5Zu2nNq9Ctfhb(CgAzDrecE, uT);
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::sQ4r:
                return py_dict::Al5S5Zu2nNq9Ctfhb(CgAzDrecE, uT);
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::IQRwk:
                return py_tuple::Al5S5Zu2nNq9Ctfhb(CgAzDrecE, uT);
            default:
                return py_attr::Al5S5Zu2nNq9Ctfhb(CgAzDrecE, uT);
        endcase
  
    endfunction




    static function py_object aDUxImGp5ZRvDX(byte unsigned TVwTWMJ [], y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZCU4Ykicox Q98HzoaTsIt0FZ);
        case(Q98HzoaTsIt0FZ)
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UJaFhKq29wH77u:
                return u36h2Q6hRv(TVwTWMJ);
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hSVNDN5PbMYZac5:
                return eJjldN7IBZW(TVwTWMJ);
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::DznvfhN3G7kVWbr:
                return zVCRvGh9ZRr(TVwTWMJ);
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::otMAUDlFbfRCYUFhs:
                return fkT3v4aMXkIyL(TVwTWMJ);
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::emC9vBHLXztIaCH:
                return jrpIofSjcZ3(TVwTWMJ);
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::uyHRtoxmDaFIh3K:
                return ouANdO2RzP1(TVwTWMJ);
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY:
                return HGomAHAjJMynBDfgmG(TVwTWMJ);    
        endcase
    endfunction

    static function py_object UjT7yD7y3hCeNdCljOc(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg PHEEj6Ebn);
        py_object PqU = aDUxImGp5ZRvDX(PHEEj6Ebn.oTVch3eSC9j(), PHEEj6Ebn.ZViAbNEWJ2IHJbf34w());
        PqU.QUlhqaMi1eO41(PHEEj6Ebn.MZvmUSgwz99qV());
        return PqU;
    endfunction

    static function py_object kgwA7i(y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hLlLE0uhT8PaOfxHIWUb Y5UzoLXupvGsESj7phJrA);
        py_object PqU = UjT7yD7y3hCeNdCljOc(Y5UzoLXupvGsESj7phJrA.NLTlAqok());;

        return PqU; 
    endfunction

endclass
    



class mGMl8qCc4I9SIwgV;

    static function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg LNlC2sgzXHEk(py_tuple args) ;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg  N7HspZIuvpfJ  = Ek1TtJMEt(0, args, TYNmCmJGWYZ6cb(args));
        return N7HspZIuvpfJ;
    endfunction

    static function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg gmOpJQ(py_object f3H);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg k6g5AL5jxBX = Ek1TtJMEt(0, f3H, TYNmCmJGWYZ6cb(f3H));
        return k6g5AL5jxBX;
    endfunction


    static function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg Ek1TtJMEt(int ajF, py_object value,
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZCU4Ykicox Q98HzoaTsIt0FZ);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg qWsJbRDvn = new();

        case (Q98HzoaTsIt0FZ)
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UJaFhKq29wH77u: begin
                y2qG0tPDlQH0v2JhCuoOEOmnKBumi::wLsqQxJev NBM4E = new();
                voUY1EJq5fNy4EsCaOyIPuaKGz::ANzoOO1 lgE = value.cast_int().get_value();
                NBM4E.Pyo9fXYz3emklni(lgE);
                V5wg787OQE(ajF, NBM4E, Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
            
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::DznvfhN3G7kVWbr: begin
                y2qG0tPDlQH0v2JhCuoOEOmnKBumi::bvQynOfMkN NBM4E = new();
                voUY1EJq5fNy4EsCaOyIPuaKGz::gAfEu67B lgE = value.cast_uint().get_value();
                NBM4E.Pyo9fXYz3emklni(lgE);
                V5wg787OQE(ajF, NBM4E, Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::hSVNDN5PbMYZac5: begin
                y2qG0tPDlQH0v2JhCuoOEOmnKBumi::GT8TV63kK4 NBM4E = new();
                NBM4E.Pyo9fXYz3emklni(voUY1EJq5fNy4EsCaOyIPuaKGz::FE299);
                V5wg787OQE(ajF, NBM4E, Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::otMAUDlFbfRCYUFhs: begin
                y2qG0tPDlQH0v2JhCuoOEOmnKBumi::uMz6Ph2rckUA NBM4E = new();
                string lgE = value.cast_string().get_value();
                NBM4E.Pyo9fXYz3emklni(lgE);
                V5wg787OQE(ajF, NBM4E, Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::emC9vBHLXztIaCH: begin
                y2qG0tPDlQH0v2JhCuoOEOmnKBumi::qPuCDX3qgi NBM4E = new();
                real lgE = value.cast_float().get_value();
                NBM4E.Pyo9fXYz3emklni(lgE);
                V5wg787OQE(ajF, NBM4E, Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::uyHRtoxmDaFIh3K: begin
                y2qG0tPDlQH0v2JhCuoOEOmnKBumi::GT8TV63kK4 NBM4E = new();
                voUY1EJq5fNy4EsCaOyIPuaKGz::jPqoqby lgE = value.cast_bool().get_value();
                NBM4E.Pyo9fXYz3emklni(lgE);
                V5wg787OQE(ajF, NBM4E, Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::xmgA3Kr7240ABDK2ayYT: begin
                V5wg787OQE(ajF, ANnUwIfkbXhOxewzhaj(value), Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WIUZhHbnGPoMtvhg: begin
                V5wg787OQE(ajF, ktTpZPLnxkp8gLR(value), Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::DHUkz0UsvWFWuhg: begin
                V5wg787OQE(ajF, KZuUIiSx9EcOe6(value), Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::v6Vc1L7d5fBzCw0: begin
                V5wg787OQE(ajF, ktTpZPLnxkp8gLR(value), Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY: begin
                V5wg787OQE(ajF, tt1pRx7qYpbmRbQ8sQ(value), Q98HzoaTsIt0FZ, qWsJbRDvn);
            end
        endcase
        return qWsJbRDvn;
    endfunction


    static function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::BXcEEdpmaLa ktTpZPLnxkp8gLR(py_object  values);
        py_collection collection;
        //TODO: consider move all collections to common interface instead of using cast to specific collection type
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::BXcEEdpmaLa BXcEEdpmaLa = new();

        if($cast(collection, values))begin
            for(voUY1EJq5fNy4EsCaOyIPuaKGz::mULkRMR8 a =0; a < collection.q9CXXM(); a++) begin
                y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg NBM4E = Ek1TtJMEt(a, collection.pfjh4(a), TYNmCmJGWYZ6cb(collection.pfjh4(a)));
                BXcEEdpmaLa.Zj9fdFAevoe1NI7(NBM4E);
            end
        end else begin
            p2y17vMAErxPUw::wGD97i6Xu6I7rRq4Tf("cannot cast to py_tuple");
        end
        return BXcEEdpmaLa;
    endfunction

    static function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::BXcEEdpmaLa ANnUwIfkbXhOxewzhaj(py_object  values);
        JoCE8680znYtm6 XXHrj;
        //TODO: consider move all collections to common interface instead of using cast to specific collection type
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::BXcEEdpmaLa BXcEEdpmaLa = new();

        if($cast(XXHrj, values))begin
            for(voUY1EJq5fNy4EsCaOyIPuaKGz::mULkRMR8 a =0; a < XXHrj.size(); a++) begin
                y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg NBM4E = Ek1TtJMEt(a, XXHrj.get(a), TYNmCmJGWYZ6cb(XXHrj.get(a)));
                BXcEEdpmaLa.Zj9fdFAevoe1NI7(NBM4E);
            end
        end else begin
            p2y17vMAErxPUw::wGD97i6Xu6I7rRq4Tf("cannot cast to py_tuple");
        end
        return BXcEEdpmaLa;
    endfunction


    static function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::TVzRDd2y13FlugjUR tt1pRx7qYpbmRbQ8sQ(py_object  value);
        py_attr attr;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::TVzRDd2y13FlugjUR s53LxIL4 = new();

        if($cast(attr, value))begin
            s53LxIL4.q2JBpc(attr.YqNxqnrd2qc());
            s53LxIL4.VSlM9qI5(attr.SyOwAKun());
            s53LxIL4.EooKojCq(attr.q28o15ZAKhEvup82U5Ke());
        end else begin
            p2y17vMAErxPUw::wGD97i6Xu6I7rRq4Tf("cannot cast to py_attr");
        end
        return s53LxIL4;
    endfunction


    static function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::GdBwsipraB KZuUIiSx9EcOe6(py_object values);
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::GdBwsipraB GdBwsipraB = new();
        py_dict Xmij;
        if($cast(Xmij, values))begin
            for(int unsigned a = 0; a < Xmij.q9CXXM(); a++)begin
                py_object ndZkzJ7XYYwVn = Xmij.pfjh4(a);
                py_pair Qi4r; 
                if($cast(Qi4r, ndZkzJ7XYYwVn))begin
                    py_object key = Qi4r.get_key();
                    py_object lgE = Qi4r.get_value();
                    // py_str str_key = new(key.to_string());
                    y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg VWHCH8N2Z = Ek1TtJMEt(0, key, TYNmCmJGWYZ6cb(key));
                    y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg OQnxpOSBd = Ek1TtJMEt(1, lgE, TYNmCmJGWYZ6cb(lgE));
                    y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WS8oUiSK6g WS8oUiSK6g = new();
                    WS8oUiSK6g.set_key(VWHCH8N2Z);
                    WS8oUiSK6g.JiwnjyL(OQnxpOSBd);
                    GdBwsipraB.Zj9fdFAevoe1NI7(WS8oUiSK6g);
                end else begin
                    p2y17vMAErxPUw::wGD97i6Xu6I7rRq4Tf("cannot cast to py_pair");
                end
            end
        end else begin
            p2y17vMAErxPUw::wGD97i6Xu6I7rRq4Tf("cannot cast to py_t_base_t");
        end
        return GdBwsipraB;
    endfunction
    
    static function y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZCU4Ykicox TYNmCmJGWYZ6cb(py_object obj) ;
        y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZCU4Ykicox iRRP0;
        case (obj.q28o15ZAKhEvup82U5Ke())
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::UCYjgjygzy : begin
                iRRP0 = obj.get_type();
            end
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::iqLRdo,
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::gKpG,
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZUO,
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::WUM4,
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::sQ4r,
            y2qG0tPDlQH0v2JhCuoOEOmnKBumi::IQRwk : begin
                iRRP0 = y2qG0tPDlQH0v2JhCuoOEOmnKBumi::SWZFScfo9d09LUlw6AvFeY;
            end
            default : begin
                string fSdLgpX7s = obj.get_type().name();
                string RZr5B2bYJ = {"'", fSdLgpX7s, "' cannot be passed as a parameter to a Python."};
                p2y17vMAErxPUw::CkqnluWCLC9z6Dnzpjd(RZr5B2bYJ);
            end
        endcase
        return iRRP0;
    endfunction

    
    static function void V5wg787OQE(int R7iQdKEqR, cJ7amx5TrpRx3xecNmD8HzZ0::NyiyvX7 NBM4E, y2qG0tPDlQH0v2JhCuoOEOmnKBumi::ZCU4Ykicox ZCU4Ykicox,
                    ref y2qG0tPDlQH0v2JhCuoOEOmnKBumi::x6JMFqNsypeWg qWsJbRDvn);
        byte unsigned qrULNPeVvojjbmW [];            
        qWsJbRDvn.QUlhqaMi1eO41(R7iQdKEqR);
        qWsJbRDvn.GxefFgsC6RPcdoIdwn(ZCU4Ykicox);
       
        if(NBM4E.aONmg154uKKVV(qrULNPeVvojjbmW) == voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            qWsJbRDvn.JKlMlKyvJYe(qrULNPeVvojjbmW);
        end else begin
            p2y17vMAErxPUw::tx3dbJAHkO9pbrCuP6Y({"Serialization error for parameter: ", ZCU4Ykicox.name()});
        end
        
    endfunction

endclass

    

/**
 * Class: pystim
 */
class pystim;


    local static bit  o84P1bUCUcSK = 1; 
    static const string NMe2AcZH = "pystim";

    local VGXJq2DS vOaiAMT2g42tLySQf1bHMlfdmP6rehyt;
    local bit XPDwdqA5CPdOKeJdV2UD7n = 0;
    local py_stim_configuration ptPK;

    local NPGsJxiCDW10p1 uzev4i5;
    local static pystim Zn4C3EhhZ3qH;
    
    local function new();
        this.vOaiAMT2g42tLySQf1bHMlfdmP6rehyt = new(o84P1bUCUcSK);
        this.uzev4i5 = NPGsJxiCDW10p1::nmGFYV1AHb(NMe2AcZH);
    endfunction


    class z2DmDILdc0F#(type t = int);


        static function bit me(py_object obj);
            return t::z2DmDILdc0F(obj);
        endfunction


    endclass

    //----------------------------------------------------------------------------
    // Function: int_
    //
    // Description:
    //     Creates a new instance of the `py_int` from `value` argument.
    //     <py_int> is a class that represents a Python integer object.
    //
    // Parameters:
    //     longint value - The input value used to initialize the `py_int` instance.
    //
    // Returns:
    //     py_int - A new instance of the `py_int` class initialized with the given value.
    //----------------------------------------------------------------------------
    static function py_int int_(longint value);
        automatic py_int py_int_ = new(value);
        return py_int_;
    endfunction

    //----------------------------------------------------------------------------
    // Function: uint_
    //
    // Description:
    //     Creates a new instance of the `py_uint` from `value` argument.
    //     <py_uint> is a class that represents a Python integer object.
    //     Python integer data type does not differentiate between signed and unsigned integers contrary to system verilog.
    //
    // Parameters:
    //     longint unsigned value - The input value used to initialize the `py_int` instance.
    //
    // Returns:
    //     py_int - A new instance of the `py_int` class initialized with the given value.
    //----------------------------------------------------------------------------
    static function py_uint uint_(longint unsigned value);
        automatic py_uint py_uint_ = new(value);
        return py_uint_;
    endfunction

    //----------------------------------------------------------------------------
    // Function: str_
    //
    // Description:
    //     Creates a new instance of the `py_str` class using the provided `value`.
    //     <py_uint> is a class that represents a Python integer object.
    //
    // Parameters:
    //     longint value - The input value used to initialize the `py_int` instance.
    //
    // Returns:
    //     py_int - A new instance of the `py_int` class initialized with the given value.
    //----------------------------------------------------------------------------
    static function py_str str_(string value);
        automatic py_str py_string_ = new(value);
        return py_string_;
    endfunction

    //----------------------------------------------------------------------------
    // Function: float_
    //
    // Description:
    //     Creates a new instance of the `<py_float>` class using the provided `value`.
    //     <py_float> is a class that represents a Python float type object.
    //
    // Parameters:
    //     real value - The input value used to initialize the `<py_float>` instance.
    //
    // Returns:
    //     py_float - A new instance of the `<py_float>` class initialized with the given value.
    //----------------------------------------------------------------------------
    static function py_float float_(real value);
        automatic py_float s2QGqprYU = new(value);
        return s2QGqprYU;
    endfunction

    //----------------------------------------------------------------------------
    // Function: bool_
    //
    // Description:
    //     Creates a new instance of the `py_bool` class using the provided `value`.
    //     <py_bool> is a class that represents a Python boolean type object.
    //
    // Parameters:
    //     bit value - The input value used to initialize the `<py_bool>` instance. 1 is true, 0 is false.
    //
    // Returns:
    //     py_bool - A new instance of the `py_bool` class initialized with the True/False value.
    //----------------------------------------------------------------------------
    static function py_bool bool_(bit value);
        automatic py_bool py_bool_ = new(value);
        return py_bool_;
    endfunction


    //----------------------------------------------------------------------------
    // Function: none_
    //
    // Description:
    //     Creates a new instance of the `<py_none>` class.
    //     <py_none> is a class that represents a Python None type object.
    //
    // Parameters:
    //     bit value - The input value used to initialize the `<py_bool>` instance. 1 is true, 0 is false.
    //
    // Returns:
    //     py_bool - A new instance of the `py_bool` class initialized with the given value.
    //----------------------------------------------------------------------------
    static function py_none none_();
        automatic py_none py_none_ = new();
        return py_none_;
    endfunction



    //----------------------------------------------------------------------------
    // Function: pair_
    //
    // Description: Creates a Python-style key-value pair from the provided key and value.
    //              This function is used to create key-value pairs for use in <py_dict> dictionaries.
    //
    // Parameters:
    //   py_object key - The key of the pair, which can be any <py_object>.
    //   py_object value - The value of the pair, which can also be any <py_object>.
    //
    // Returns:
    //   A <py_pair> object representing the key-value pair.
    //
    //----------------------------------------------------------------------------
    static function py_pair pair_(py_object key, py_object value);
        automatic py_pair Qi4r = new(key, value);
        return Qi4r;
    endfunction


    //----------------------------------------------------------------------------
    // Function: tuple_
    //
    // Description: Creates a Python-style tuple from an array of <py_object>
    //              objects and returns it as a <py_tuple> object.
    //
    // Parameters:
    //   args - An array of <py_object> objects to be included in the tuple.   
    // 
    // Returns:
    //   A py_tuple object containing the elements provided in the input array.
    //
    //----------------------------------------------------------------------------
    static function py_tuple tuple_(py_object args[]);
        automatic py_tuple py_tuple_ = py_tuple::create(args);
        return py_tuple_;
    endfunction

    //----------------------------------------------------------------------------
    // Function: list_
    //
    // Description: Creates a Python-style list from an array of <py_object>
    //              objects and returns it as a <py_list> object.
    //
    // Parameters:
    //   args - An array of <py_object> objects to be included in the list.
    //
    // Returns:
    //   A py_list object containing the elements provided in the input array.
    //
    //----------------------------------------------------------------------------
    static function py_list list_(py_object args[]);
        automatic py_list py_list_ = py_list::create(args);
        return py_list_; 
    endfunction  

    //----------------------------------------------------------------------------
    // Function: error_
    //
    // Description: Creates a SystemVerilog error object with the provided message.
    //              This function is used to create error objects representing
    //              exceptions or errors that may occur during Python execution.
    //
    // Parameters:
    //   msg - A string message describing the error.
    //
    // Returns:
    //   A <py_error> object containing the error message.
    //
    //--------------------------------------------------------------------------
    static function py_error error_(string oxM);
        automatic py_error r3UCj91GJ = py_error::create(oxM);
        return r3UCj91GJ;;
    endfunction

    //----------------------------------------------------------------------------
    // Function: dict_
    // Description: Creates a Python-style dictionary from an array of key-value 
    //              pairs <py_pair> and returns it as a <py_dict> object.
    //
    // Parameters:
    //   args - An array of <py_pair> objects representing key-value pairs to be 
    //          included in the dictionary.
    //
    // Returns:
    //   A py_dict object containing the key-value pairs provided in the input array.
    //
    // Usage:
    //   This function is a static utility to simplify the creation of <py_dict> 
    //   objects from an array of key-value pairs.
    //----------------------------------------------------------------------------
    static function py_dict dict_(py_pair args[]);
        automatic py_dict Ppd5VkRTz3J = py_dict::create(args);
        return Ppd5VkRTz3J;
    endfunction





    protected function bit x5tsBqzgl7De2LJJq1xKG0dP();
        return XPDwdqA5CPdOKeJdV2UD7n;
    endfunction

    protected function void hH6rhfee3IesUI0QgUViFuUuz();
        XPDwdqA5CPdOKeJdV2UD7n = 1;
    endfunction

    static function pystim bmoeAW2mxLIp();
        if (Zn4C3EhhZ3qH == null) begin
            Zn4C3EhhZ3qH = new();
        end 
        return Zn4C3EhhZ3qH;
    endfunction

    local function void sj6GasvXh9VH0K4O3(py_stim_configuration jB5AoJdG6xX5N);
        this.ptPK = jB5AoJdG6xX5N;
    endfunction


    function bit T7i1oOqlD2BSM6zJlwm2qk7lzFfty();
        return is_python_interpreter_running_dpic();
    endfunction


    local function void initialize_python_env_dpic_wrap(XPKS2Jm2zrk QM4YdMaqk);
        GnnR0DtA mrE = GnnR0DtA ' ( initialize_python_env_dpic(QM4YdMaqk.knM9uB(), QM4YdMaqk.UstPx28T()));
    endfunction 



    //TODO add version print for cpp and SV, and python. 
    function void bYif(ySugyMFT337ItXkViR::python_env_configuration cfg);
        byte unsigned qrULNPeVvojjbmW [];
        if(cfg.aONmg154uKKVV(qrULNPeVvojjbmW) == voUY1EJq5fNy4EsCaOyIPuaKGz::Cf0gmunuX)begin
            XPKS2Jm2zrk QM4YdMaqk = XPKS2Jm2zrk::X7Pz9wtll(IvnUAo9rcO7ndi ,qrULNPeVvojjbmW);
            initialize_python_env_dpic_wrap(QM4YdMaqk); 
        end else begin
            p2y17vMAErxPUw::tx3dbJAHkO9pbrCuP6Y("python_env_configuration");
        end
    endfunction

    local function ySugyMFT337ItXkViR::python_env_configuration ZcqpS4mQjiVHl(py_stim_configuration cfg);
        ySugyMFT337ItXkViR::python_env_configuration H8OK2y = new();
        if(cfg.jD1576yKUqi2gByN2TY() > 0)begin
            H8OK2y.qtOqaMSpBh8PJ(ySugyMFT337ItXkViR::EbErUxja);
        end
        H8OK2y.set_seed(cfg.get_seed());
        return H8OK2y;
    endfunction



    //--------------------------------------------------------------------------
    // Function: print
    // Description:
    // The print() function is a utility provided by PysStim to mimic Python’s built-in print() function within SystemVerilog code.
    //  It allows you to print Python-style output from SystemVerilog in a way that integrates well with the Python interpreter 
    // and redirection mechanisms.
    // Arguments:
    //     py_object - arg1, arg2, arg3, ... - Python objects to print.
    // Returns:
    //     void - No return value.
    // Example:
    // (code)
    //     py_exec::print(py::int_(42), py::str_("Hello, World!"), py::float_(3.14));
    //  (end)
    // -------------------------------------------------------------------------
    static function void print(input py_object arg1,  input py_object arg2 = null,  input py_object arg3 = null,
                        input py_object arg4 = null,  input py_object arg5 = null,  input py_object arg6 = null,
                        input py_object arg7 = null,  input py_object arg8 = null,  input py_object arg9 = null,
                        input py_object arg10 = null, input py_object arg11 = null, input py_object arg12 = null,
                        input py_object arg13 = null, input py_object arg14 = null, input py_object arg15 = null,
                        input py_object arg16 = null, input py_object arg17 = null, input py_object arg18 = null,
                        input py_object arg19 = null, input py_object arg20 = null);
        py_exec K = py_exec::py_print();
        K.print(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20);
    endfunction


    //--------------------------------------------------------------------------
    // Function: exec
    // Description:
    // The exec() function is a utility provided by PyStim to execute Python code strings (Any Python code block) directly from SystemVerilog using the embedded Python interpreter.
    //  It's a powerful feature for embedding Python scripts, running dynamic expressions, or executing multi-line code blocks.
    // Arguments:
    //     string - exp - The string to execute in python interpreter.
    //     py_dict - globals - A dictionary representing the global namespace in the Python environment.
    //     py_dict - locals - A dictionary representing the local namespace in the Python environment.
    // Returns:
    //     py_object - The result of the executed code. If exception occurs, the function returns a py_error object. otherwise, 
    // it returns py_none.
    // Example:
    // (code)
    // py::dict local = py::locals();
    // py::exec("x = 42", py::globals(), local);
    // locals.get(py::str_("x")).cast_int().get_value(); // Access the result from Python
    // // This will return 42
    // (end)
    // -------------------------------------------------------------------------
    static function  py_object exec(string exp, ref py_dict globals, ref py_dict locals);
        py_exec K = py_exec::py_exec_();
        py_object Iuo = K.exec(exp, globals, locals);
        return Iuo;
    endfunction


    //--------------------------------------------------------------------------
    // Function: eval
    // Description:
    // The eval() function allows you to evaluate a Python expression from SystemVerilog and get back its result as a py_object. 
    // It’s the SystemVerilog equivalent of Python’s built-in eval() — useful when you want to run expressions that return a value, as opposed to general-purpose code blocks (exec).
    // Arguments:
    //     string - exp - The expression to evaluate in Python.
    //     py_dict - globals - A dictionary representing the global namespace in the Python environment.
    //     py_dict - locals - A dictionary representing the local namespace in the Python environment.
    // Returns:
    //     py_object - The result of the evaluated expression. If an exception occurs, the function returns a py_error object.
    // Example:
    // (code)
    //     py_dict globals = py::globals();
    //     py_dict locals = py::locals();
    //     py_object result = py::eval("2 + 1", globals, locals);
    //     result.cast_int().get_value(); // Access the result from Python
    //     // This will return 3 the result of the expression evaluated in Python.
    // (end)
    // -------------------------------------------------------------------------
    static function py_object eval(string exp, py_dict globals, py_dict locals);
        py_exec K = py_exec::py_eval();
        py_object Iuo = K.exec(exp, globals, locals);
        return Iuo;
    endfunction

    //--------------------------------------------------------------------------
    // Function: eval_file
    // Description:
    // The eval_file() function allows you to evaluate a Python script from a file. It's a convenient way to run full Python scripts from SystemVerilog and get to access to execution results.
    // Arguments:
    //     string - exp - The file name of the python script to evaluate. 
    //     py_dict - globals - A dictionary representing the global namespace in the Python environment.
    //     py_dict - locals - A dictionary representing the local namespace in the Python environment.
    // Returns:
    //     py_object - The result of the evaluated expression. If an exception occurs, the function returns a py_error object.
    //--------------------------------------------------------------------------
    static function py_object eval_file(string exp, py_dict globals, py_dict locals);
        py_exec K = py_exec::w3lWry3n3KXA();
        py_object Iuo = K.exec(exp, globals, locals);
        return Iuo;
    endfunction


    //--------------------------------------------------------------------------
    // Function: globals
    // Description:
    // The globals() function returns a dictionary representing the global namespace in the Python environment.
    // globals() in PyStim gives you access to the current global symbol table of the Python interpreter — equivalent to calling globals() in Python.
    // Arguments:
    //     None
    // Returns:
    //     py_dict - A dictionary representing the global namespace in the Python environment.
    //--------------------------------------------------------------------------
    static function py_dict globals();
        py_dict rMFeTfGb;
        py_dict lEGpG3C;
        py_exec K = py_exec::eafn2kh2sOP2ubOCUpzA6NP();
        py_object Iuo = K.exec("get_globals", rMFeTfGb, lEGpG3C);
        return Iuo.cast_dict();
    endfunction


    //--------------------------------------------------------------------------
    // Function: locals
    // Description:
    // The locals() function returns a dictionary representing the local namespace in the Python environment. By default it returns an empty dictionary.
    // Arguments:
    //     None
    // Returns:
    //     py_dict - A dictionary representing the local namespace in the Python environment.
    //--------------------------------------------------------------------------
    static function py_dict locals();
        py_dict Ppd5VkRTz3J = py_dict::create_empty();
        return Ppd5VkRTz3J;
    endfunction


    //--------------------------------------------------------------------------
    // Function: get_configuration
    // Description:
    //     Returns the current configuration object of the Python environment.
    //     This function is useful for retrieving the settings and parameters used to initialize the Python interpreter.
    // Arguments:
    //     None
    // Returns:
    //     py_stim_configuration - The current configuration object of the Python environment.
    //     This object contains various settings and parameters used to configure the Python interpreter.
    // -------------------------------------------------------------------------
    function py_stim_configuration Qy0q0wdlLrOZN3zwo();
        return this.ptPK;
    endfunction

    //--------------------------------------------------------------------------
    // Function: initialize_interpreter
    // Description:
    //     Initializes the Python interpreter and sets up the environment for executing Python code.
    //     This function is should be called at the beginning of a simulation to prepare the Python environment.
    //     It is important to call this function before executing any Python code or using any Python-related features.
    //     It is a crucial function when you're embedding Python inside a SystemVerilog application.
    // Arguments:
    //     py_stim_configuration cfg - A configuration object that contains settings for the Python environment.
    //     If null, default settings are used.
    // Returns:
    //     void - No return value.
    //-------------------------------------------------------------------------
    static function void initialize_interpreter(py_stim_configuration cfg = null);
        pystim mUR3tWXi9L8JgUS2MueFC = pystim::bmoeAW2mxLIp();
        if(mUR3tWXi9L8JgUS2MueFC.uTPJ0n8hTr69kqP(cfg) == SQuIE9F)begin
            Jky7uhq1CwrihOso4QK28YJXeCW();
        end
    endfunction


    //--------------------------------------------------------------------------
    // Function: finalize_interpreter
    // Description:
    //     Finalizes the Python interpreter and cleans up the environment.
    //     This function should be called at the end of a simulation to properly shut down the Python environment.
    //     It is important to call this function to ensure that all resources are released and the Python interpreter is properly terminated.
    // Arguments:
    //     None
    // Returns:
    //     void - No return value.
    //-------------------------------------------------------------------------
    static function void finalize_interpreter();
        pystim mUR3tWXi9L8JgUS2MueFC = pystim::bmoeAW2mxLIp();
        mUR3tWXi9L8JgUS2MueFC.VrNWFw4tbyK5C();
        kM852O6tLaJnJWn8zrJ3IyoVl();
    endfunction


    local function GnnR0DtA uTPJ0n8hTr69kqP(py_stim_configuration cfg = null);
        int f90jXDhr;
        GnnR0DtA Lao2Tl = SQuIE9F;
        if(x5tsBqzgl7De2LJJq1xKG0dP())begin
            p2y17vMAErxPUw::t90lq6I84z2Mi6hPoyhIX708RJSxkKg();
        end else begin
            ySugyMFT337ItXkViR::python_env_configuration LDXwInu ;
            if(cfg == null)begin
                ptPK = new();
            end else begin
                ptPK = cfg;
            end
            LDXwInu = ZcqpS4mQjiVHl(ptPK);
            if(T7i1oOqlD2BSM6zJlwm2qk7lzFfty())begin
               SMdegkVrXHm2cpwuO();
            end 
            bYif(LDXwInu);
            uzev4i5.bnSJ("Starting python interpreter", gVZL);
            f90jXDhr = start_python_simulation_dpic();
            if(f90jXDhr == 0)begin
                hH6rhfee3IesUI0QgUViFuUuz();
                vOaiAMT2g42tLySQf1bHMlfdmP6rehyt.trigger();
            end else begin
                Lao2Tl = abjkc;
                $fatal(1, "Python interpreter failed to start. Failed to check out license.");
            end

        end
        return Lao2Tl;
    endfunction

    local function void VrNWFw4tbyK5C();
        stop_python_simulation_dpic();
        dzkWbRJFzWh();
    endfunction

    function NPGsJxiCDW10p1 nmGFYV1AHb();
        return this.uzev4i5;
    endfunction

    function void SMdegkVrXHm2cpwuO();
        finalize_interpreter();
        dzkWbRJFzWh();
    endfunction
 
    function bit n3doCzTGotgvPoe7yegYiHQ1V1wbBF0U();
        return vOaiAMT2g42tLySQf1bHMlfdmP6rehyt.tFNeshESWAjp();
    endfunction
    
    task JJlmheEsI7WwurPbUgdHNWHy4aSWIlExaEPKvQ();
        vOaiAMT2g42tLySQf1bHMlfdmP6rehyt.MzIo8li1zhpzto();
    endtask


    function void dzkWbRJFzWh();
        kM852O6tLaJnJWn8zrJ3IyoVl();
        this.vOaiAMT2g42tLySQf1bHMlfdmP6rehyt.clear();
        this.XPDwdqA5CPdOKeJdV2UD7n = 0;
    endfunction


endclass

    





  
/**
 * @class runtime_errors
 * This class provides a set of static functions to handle (report) runtime errors in the sv_protobuf_data_types package.
 */
class p2y17vMAErxPUw;

    local static string l0ccAJclfBalloa2 = "PYSTIM_ERROR";
    static bit QTAkKnbPf9VlY = 1;

    /**
     * @function error
     * Displays an error message with the given message string.
     * @param msg The error message to display.
     */
    static function void IXPOZ(string oxM);
      pystim::finalize_interpreter();
      if(QTAkKnbPf9VlY)begin
        $error("[%s]: %s", l0ccAJclfBalloa2, oxM);
      end else begin
        $display("[%s]: %s", l0ccAJclfBalloa2, oxM);
      end
    endfunction

    /**
     * @function unimplemented_method_invocation
     * Displays an error message for an unimplemented method invocation.
     * @param msg Additional information about the error (optional).
     */
    static function void Xsu4gdzW8VzYxgADg7wBcDTcaqOHoHR(string oxM="");
      IXPOZ({"Unimplemented method invocation. ", oxM});
    endfunction



    static function void CkqnluWCLC9z6Dnzpjd(string oxM="");
      IXPOZ({"Unsupported method. ", oxM});
    endfunction

    /**
     * @function atemp_assign_already_register_id
     * Displays an error message for an attempt to assign an already registered id.
     * @param id The id that is already registered.
     */
    static function void RsP6YTVsFva59ZecDiURsutJkhgrtUKqnl(int uT);
      IXPOZ({"Attempt to assign already registered id: %0d", uT});
    endfunction


    static function void sIZhIFz4jmBwcLp4BX8KTZ9Y2J1i4yQvL4q(string Va7daQ5RTpD, string RZr5B2bYJ);
      string oxM = $sformatf("SV Python method invocation failed: method '%s'. Error: %s", Va7daQ5RTpD, RZr5B2bYJ); 
      IXPOZ(oxM);
    endfunction


    static function void jFNa5AZTfgNLfwuBOFbN0imxDS(string module_name);
      IXPOZ({"Failed to import python module: ", module_name});
    endfunction

    /**
     * 
     * Description:
     * This function is called when there is an attempt to access an ID that is not registered.
     * It generates an error message indicating the ID that was attempted to be accessed.
     * 
     * Parameters:
     * - id: The ID that was attempted to be accessed.
     * 
     * Returns: 
     * void
     */
    static function void oJM1GLPnPqu8zmXGNcKI0KSQjuRBYXnVw(int uT);
      IXPOZ({"Attempt to access not registered id: %0d", uT});
    endfunction

    static function void NcVheLIVKpNeHuw5aImO2yD2bOM();
      IXPOZ("Unsupported type conversion.");
    endfunction


    /**
     * @brief Function to attempt to resignate a not registered ID.
     *
     * This function is used to generate an error message when attempting to resignate
     * an ID that is not registered.
     *
     * @param id The ID that was attempted to be resignated.
     */
    static function void Um1Vyjeu8VSyBFxgObLbx9Xghsn43y6Ti(int uT);
      IXPOZ({"Attempt resignate not registered id: %0d", uT});
    endfunction

    /**
     * @function unsupported_method_invocation
     * Displays an error message for an unsupported method invocation.
     * @param msg Additional information about the error (optional).
     */
    static function void j88WopVosjBSDqHUGLOwOV1beHlCb(string oxM="");
      IXPOZ({"Unsupported method invocation:", oxM});
    endfunction

    /**
     * @function type_casting_error
     * Displays an error message for a type casting error.
     * @param msg Additional information about the error (optional).
     */
    static function void wGD97i6Xu6I7rRq4Tf(string oxM="");
      IXPOZ({"Type casting error: ", oxM});
    endfunction 

    /**
     * @function buffer_size_limit_exceeded_error
     * Displays an error message for exceeding the buffer size limit.
     * @param msg Additional information about the error (optional).
     */
    static function void lYYmPUYsgG6HAQdzKo9RKh6SxOUSkmaO(string oxM="");
      IXPOZ({"Buffer size limit exceeded: ", oxM});
    endfunction 

    static function void j91YcEJyppZUAvI7JdNNNoZI7TyWiLh8(int p9nBflwNClq, int bo15Guyso0J);
      IXPOZ({"Buffer size limit exceeded. Static array capacity %0d, dynamic array size %0d.", p9nBflwNClq, bo15Guyso0J});
    endfunction 


    static function void tx3dbJAHkO9pbrCuP6Y(string oxM="");
      IXPOZ({"Data serialization failed in ", oxM, "."});
    endfunction 


    static function void AwXStyecwU8BhjIrzhW1D(string oxM="");
      IXPOZ({"Data deserialization failed in ", oxM, "."});
    endfunction


    static function void hNgQCEFetwKHQb6AgyBhhZ(string oxM="");
      IXPOZ({"Empty test module name."});
    endfunction 

    static function void nABmrT59Mmwk50gMDsIfIO4twY53wW2fC4TsY9yxJM();
      IXPOZ({"Python simulation can be initialized and started only once during SV simulation."});
    endfunction 

    static function void t90lq6I84z2Mi6hPoyhIX708RJSxkKg();
      IXPOZ({"Python simulation can be initialized and started only once during SV simulation."});
    endfunction 

    static function void HIKLRRHyTu9aLKAKZaxUPAo7HE3PshDJLGeBJ();
      IXPOZ({"Python simulation environment should be initialized before started of python simulation."});
    endfunction 

    static function void QKP1J6bvNL3Rcess9OdsG9J9CzdGl(string fSdLgpX7s);
      IXPOZ($sformatf("Method not supported for '%s' type object.", fSdLgpX7s));
    endfunction 

    static function void NkXWOaQNPTbqb22YqV9IB8Gmd();
      IXPOZ({"Attribute methods only supported for py_callable objects."});
    endfunction 

    static function void rGCmPYL2JiCLJ9xSeF3b1hqsYucTB();
      IXPOZ("Python simulation not started. Python simulation must be started before python methods invocation.");
    endfunction

    static function void mKfthePfevoR0TJ6jRUA6V(string nWAZteFFx);
      IXPOZ($sformatf("Object already deleted. Object id: %s", nWAZteFFx));
    endfunction

endclass

 // End of _ERRORS_Sv_



    const static bit True = 1;
    const static bit False = 0;


    function py_int int_(longint value);
        return pystim::int_(value);
    endfunction

    function py_uint uint_(longint unsigned value);
        return pystim::uint_(value);
    endfunction

    function py_str str_(string value);
        return pystim::str_(value);
    endfunction

    function py_float float_(real value);
        return pystim::float_(value);
    endfunction

    function py_bool bool_(bit value);
        return pystim::bool_(value);
    endfunction

    function py_none none_();
        return pystim::none_();
    endfunction

    function py_pair pair_(py_object key, py_object value);
        return pystim::pair_(key, value);
    endfunction

    function py_tuple tuple_(py_object args[]);
        return pystim::tuple_(args);
    endfunction

    function py_list list_(py_object args[]);
        return pystim::list_(args);
    endfunction  

    function py_dict dict_(py_pair args[]);
        return pystim::dict_(args);
    endfunction

    function void print(input py_object arg1,  input py_object arg2 = null,  input py_object arg3 = null,
                        input py_object arg4 = null,  input py_object arg5 = null,  input py_object arg6 = null,
                        input py_object arg7 = null,  input py_object arg8 = null,  input py_object arg9 = null,
                        input py_object arg10 = null, input py_object arg11 = null, input py_object arg12 = null,
                        input py_object arg13 = null, input py_object arg14 = null, input py_object arg15 = null,
                        input py_object arg16 = null, input py_object arg17 = null, input py_object arg18 = null,
                        input py_object arg19 = null, input py_object arg20 = null);
        pystim::print(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20);
    endfunction


    function automatic py_object exec(string exp, ref py_dict globals, ref py_dict locals);
        return pystim::exec(exp, globals, locals);
    endfunction

    function automatic py_object eval(string exp, ref py_dict globals, ref py_dict locals );
        return pystim::eval(exp, globals, locals);
    endfunction

    function automatic py_object eval_file(string exp, ref py_dict globals, ref py_dict locals );
        return pystim::eval_file(exp, globals, locals);
    endfunction

    function automatic py_dict globals();
        return pystim::globals();
    endfunction

    static pystim mUR3tWXi9L8JgUS2MueFC = pystim::bmoeAW2mxLIp();


    function py_stim_configuration Qy0q0wdlLrOZN3zwo();
        return mUR3tWXi9L8JgUS2MueFC.Qy0q0wdlLrOZN3zwo();
    endfunction

    function void initialize_interpreter(py_stim_configuration cfg = null);
        pystim::initialize_interpreter(cfg);
    endfunction

    function void finalize_interpreter();
        pystim::finalize_interpreter();
    endfunction



endpackage
