code: def _update_shape(
      api,
      task_id,
      label_id,
      label=None,
      points=None,
      attributes=None,
      occluded=None,
      group_id=None,
  ):
      anno_json = api.get(api.task_annotation_url(task_id)).json()
      shape = _find_shape(anno_json, label_id)
      if shape is not None:
          if points is not None:
              shape["points"] = points
          if occluded is not None:
              shape["occluded"] = occluded
          if group_id is not None:
              shape["group"] = group_id
          if attributes is not None:
              attr_id_map, class_id_map = api._get_attr_class_maps(
                  task_id
              )
              if label is None:
                  label_id = shape["label_id"]
                  attr_id_map = attr_id_map[label_id]
              else:
                  label_id = class_id_map[label]
                  prev_attr_id_map = attr_id_map[shape["label_id"]]
                  prev_attr_id_map = {
                      v: k for k, v in prev_attr_id_map.items()
                  }
                  attr_id_map = attr_id_map[label_id]
                  shape["label_id"] = label_id
                  for attr in shape["attributes"]:
                      spec = prev_attr_id_map[attr["spec_id"]]
                      attr["spec_id"] = attr_id_map[spec]
              for attr_name, attr_val in attributes:
                  if attr_name in attr_id_map:
                      shape["attributes"].append(
                          {
                              "spec_id": attr_id_map[attr_name],
                              "value": attr_val,
                          }
                      )
  
          update_json = {
              "version": 1,
              "tags": [],
              "shapes": [shape],
              "tracks": [],
          }
          update_url = (
              api.task_annotation_url(task_id) + "?action=update"
          )
          api.patch(update_url, json=update_json)
  
imports: from bson import ObjectId
  from collections import defaultdict
  import numpy
  import os
  import unittest
  import eta.core.utils
  import fiftyone
  import fiftyone.utils.cvat
  import fiftyone.zoo
  from fiftyone.core.expressions import ViewField
label_desc: Use image node_id 7 for calling a global function with example usage: _update_shape(api, task_id, label_id, label, points, attributes, occluded, group_id) without return types