code: def complete_trial_with_tensorboard_metrics(
      self, trial, tensorboard_metrics
  ):
      for tensorboard_metric in tensorboard_metrics:
          self.create_trial_metric(
              trial.study_name,
              trial.id,
              tensorboard_metric.step,
              tensorboard_metric.value,
          )
  
      url = "{}/suggestion/v1/studies/{}/trials/{}".format(
          self.endpoint, trial.study_name, trial.id
      )
      objective_value = tensorboard_metrics[-1].value
      request_data = {
          "status": "Completed",
          "objective_value": objective_value,
      }
  
      response = requests.put(url, json=request_data)
  
      if response.ok:
          trial = Trial.from_dict(response.json()["data"])
  
      return trial
  
imports: import os
  import json
  import requests
  from .model import Study
  from .model import Trial
  from .model import TrialMetric
label_desc: Use image node_id 13 for calling the AdvisorClient obj's underlying member method code with example usage: obj.complete_trial_with_tensorboard_metrics(trial, tensorboard_metrics) and returns: trial