"""Serializes operator into a JSON object."""
        serialize_op = cls.serialize_to_json(op, cls._decorated_fields)
        serialize_op["_task_type"] = getattr(op, "_task_type", type(op).__name__)
        serialize_op["_task_module"] = getattr(op, "_task_module", type(op).__module__)
        if op.operator_name != serialize_op["_task_type"]:
            serialize_op["_operator_name"] = op.operator_name
        
        serialize_op["_is_empty"] = op.inherits_from_empty_operator
        if op.operator_extra_links:
            serialize_op["_operator_extra_links"] = cls._serialize_operator_extra_links(
                op.operator_extra_links
            )
        if include_deps:
            serialize_op["deps"] = cls._serialize_deps(op.deps)
        
        
        
        forbidden_fields = set(inspect.signature(BaseOperator.__init__).parameters.keys())
        if op.template_fields:
            for template_field in op.template_fields:
                if template_field in forbidden_fields:
                    raise AirflowException(f"Cannot template BaseOperator fields: {template_field}")
                value = getattr(op, template_field, None)
                if not cls._is_excluded(value, template_field, op):
                    serialize_op[template_field] = serialize_template_field(value)
        if op.params:
            serialize_op["params"] = cls._serialize_params_dict(op.params)
        return serialize_op
    @classmethod
    def _serialize_deps(cls, op_deps: Iterable[BaseTIDep]) -> list[str]: