code: def is_duplicate_event(
      first_event: Dict[str, Any], second_event: Dict[str, Any]
  ):
      return (
          first_event["time"] == second_event["time"]
          or first_event["page"]["pagePath"]
          == second_event["page"]["pagePath"]
      )
  
file_path: tfx/tfx/examples/tfjs_next_page_prediction/bigquery_beam_data_generation.py
imports: from typing import Any, Dict, List, Union
  import apache_beam
  from apache_beam.io.gcp.internal.clients import bigquery
  import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: is_duplicate_event(first_event, second_event) and returns: unknown