code: def add_gateway_to_diagram(self, process_id, gateway_type, gateway_name="", gateway_direction="Unspecified",
                                 node_id=None):
          
          gateway_id, gateway = self.add_flow_node_to_diagram(process_id, gateway_type, gateway_name, node_id)
          if not (gateway_direction in ("Unspecified", "Converging", "Diverging", "Mixed")):
              raise bpmn_exception.BpmnPythonError("Invalid value passed as gatewayDirection parameter. Value passed: "
                                                   + gateway_direction)
          self.diagram_graph.node[gateway_id][consts.Consts.gateway_direction] = gateway_direction
          return gateway_id, gateway
docs: Adds an exclusiveGateway element to BPMN diagram.
  
          :param process_id: string object. ID of parent process,
          :param gateway_type: string object. Type of gateway to be added.
          :param gateway_name: string object. Name of exclusive gateway,
          :param gateway_direction: string object. Accepted values - "Unspecified", "Converging", "Diverging", "Mixed".
              Default value - "Unspecified",
          :param node_id: string object. ID of node. Default value - None.
  
          :return: a tuple, where first value is gateway ID, second a reference to created object.