code: def test_log_precision_recall(run_obj):
      y_true = [0, 0, 1, 1]
      y_scores = [0.1, 0.4, 0.35, 0.8]
      no_skill = 0.1
      title = "TestPrecisionRecall"
  
      run_obj._artifact_uploader.upload_object_artifact.return_value = (
          "s3uri_value",
          "etag_value",
      )
      with run_obj:
          run_obj.log_precision_recall(
              y_true,
              y_scores,
              0,
              title=title,
              no_skill=no_skill,
              is_output=False,
          )
  
          expected_data = {
              "type": "PrecisionRecallCurve",
              "version": 0,
              "title": title,
              "precision": [0.5, 0.3333333333333333, 0.5, 0.0, 1.0],
              "recall": [1.0, 0.5, 0.5, 0.0, 0.0],
              "averagePrecisionScore": 0.5,
              "noSkill": 0.1,
          }
          run_obj._artifact_uploader.upload_object_artifact.assert_called_with(
              title, expected_data, file_extension="json"
          )
  
          run_obj._lineage_artifact_tracker.add_input_artifact.assert_called_with(
              name=title,
              source_uri="s3uri_value",
              etag="etag_value",
              artifact_type="PrecisionRecallCurve",
          )
  
imports: from __future__ import absolute_import
  import datetime
  import unittest
  import cloudpickle
  from math import inf, nan
  from unittest.mock import patch, Mock, MagicMock
  import dateutil
  import pytest
  from sagemaker.experiments import _environment, SortOrderType
  from sagemaker.experiments._api_types import TrialComponentArtifact, TrialComponentSummary, TrialComponentStatus, _TrialComponentStatusType, TrialComponentSearchResult
  from sagemaker.experiments.experiment import Experiment
  from sagemaker.experiments.run import TRIAL_NAME_TEMPLATE, MAX_RUN_TC_ARTIFACTS_LEN, MAX_NAME_LEN_IN_BACKEND, EXPERIMENT_NAME, RUN_NAME, TRIAL_NAME, DELIMITER, RUN_TC_TAG, SortByType
  from sagemaker.experiments import Run, load_run, list_runs
  from sagemaker.experiments.trial import _Trial
  from sagemaker.experiments.trial_component import _TrialComponent
  from sagemaker.experiments._helper import _DEFAULT_ARTIFACT_PREFIX
  from tests.unit.sagemaker.experiments.helpers import mock_trial_load_or_create_func, mock_tc_load_or_create_func, TEST_EXP_NAME, TEST_EXP_NAME_MIXED_CASE, TEST_RUN_NAME, TEST_EXP_DISPLAY_NAME, TEST_RUN_DISPLAY_NAME, TEST_ARTIFACT_BUCKET, TEST_ARTIFACT_PREFIX, TEST_TAGS
label_desc: Use image node_id 35 for calling a global function with example usage: test_log_precision_recall(run_obj) without return types