code: def _f1_score(precision, recall):
      return safe_divide(2 * precision * recall, (precision + recall))
  
imports: from collections.abc import Sequence
  import dataclasses
  from typing import Any
  import numpy
  from numpy import typing
  from tensorflow_model_analysis.experimental.lazytf import api
  from tensorflow_model_analysis.experimental.metrics.aggregates import _classification
label_desc: Use image node_id 4 for calling a global function with example usage: _f1_score(precision, recall) and returns: safe_divide