original_docstring: Serializes operator into a JSON object.
docstring: Serializes operator into a JSON object.
docstring_tokens: Serializes operator into a JSON object .
code: def serialize_operator(cls, op: BaseOperator) -> dict:
          """Serializes operator into a JSON object."""
          serialize_op = cls.serialize_to_json(op, cls._decorated_fields)
          serialize_op['_task_type'] = op.__class__.__name__
          serialize_op['_task_module'] = op.__class__.__module__
          if op.operator_extra_links:
              serialize_op['_operator_extra_links'] = cls._serialize_operator_extra_links(
                  op.operator_extra_links
              )
  
          # Store all template_fields as they are if there are JSON Serializable
          # If not, store them as strings
          if op.template_fields:
              for template_field in op.template_fields:
                  value = getattr(op, template_field, None)
                  if not cls._is_excluded(value, template_field, op):
                      serialize_op[template_field] = serialize_template_field(value)
  
          return serialize_op
code_tokens: def serialize_operator ( cls , op : BaseOperator ) -> dict : serialize_op = cls . serialize_to_json ( op , cls . _decorated_fields ) serialize_op [ '_task_type' ] = op . __class__ . __name__ serialize_op [ '_task_module' ] = op . __class__ . __module__ if op . operator_extra_links : serialize_op [ '_operator_extra_links' ] = cls . _serialize_operator_extra_links ( op . operator_extra_links ) if op . template_fields : for template_field in op . template_fields : value = getattr ( op , template_field , None ) if not cls . _is_excluded ( value , template_field , op ) : serialize_op [ template_field ] = serialize_template_field ( value ) return serialize_op
short_docstring: Serializes operator into a JSON object.
short_docstring_tokens: Serializes operator into a JSON object .
comment: """Serializes operator into a JSON object."""$SEP$# Store all template_fields as they are if there are JSON Serializable$SEP$# If not, store them as strings