code: def update_variant_by_id(cls, variant_id, variant, **kwargs):
          
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async'):
              return cls._update_variant_by_id_with_http_info(variant_id, variant, **kwargs)
          else:
              (data) = cls._update_variant_by_id_with_http_info(variant_id, variant, **kwargs)
              return data
docs: Update Variant
  
          Update attributes of Variant
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async=True
          >>> thread = api.update_variant_by_id(variant_id, variant, async=True)
          >>> result = thread.get()
  
          :param async bool
          :param str variant_id: ID of variant to update. (required)
          :param Variant variant: Attributes of variant to update. (required)
          :return: Variant
                   If the method is called asynchronously,
                   returns the request thread.