def METHOD_NAME(cls, company_name, chart_template=None, **kwargs):
    company_data = super_setup_company_data(
        company_name, chart_template=chart_template, **kwargs
    )
    # Create stock config.
    if not company_data.get("default_account_stock_in"):
        company_data["default_account_stock_in"] = cls.env[
            "account.account"
        ].create(
            {
                "name": "default_account_stock_in",
                "code": "STOCKIN",
                "reconcile": True,
                "user_type_id": cls.env.ref(
                    "account.data_account_type_current_assets"
                ).id,
                "company_id": company_data["company"].id,
            }
        )
    if not company_data.get("default_account_stock_out"):
        company_data["default_account_stock_out"] = cls.env[
            "account.account"
        ].create(
            {
                "name": "default_account_stock_out",
                "code": "STOCKOUT",
                "reconcile": True,
                "user_type_id": cls.env.ref(
                    "account.data_account_type_current_assets"
                ).id,
                "company_id": company_data["company"].id,
            }
        )
    if not company_data.get("default_account_stock_valuation"):
        company_data["default_account_stock_valuation"] = cls.env[
            "account.account"
        ].create(
            {
                "name": "default_account_stock_valuation",
                "code": "STOCKVAL",
                "reconcile": True,
                "user_type_id": cls.env.ref(
                    "account.data_account_type_current_assets"
                ).id,
                "company_id": company_data["company"].id,
            }
        )
    if not company_data.get("default_warehouse"):
        company_data["default_warehouse"] = cls.env["stock.warehouse"].search(
            [("company_id", "=", company_data["company"].id)],
            limit=1,
        )
    return company_data