class_docstr: Manager for backend model objects
docstr: Update the given model for a given task ID
docstr_tok: ["Update","the","given","model","for","a","given","task","ID"]
code: def update_and_upload(
      self,
      model_file,
      design=None,
      labels=None,
      name=None,
      comment=None,
      tags=None,
      task_id=None,
      project_id=None,
      parent_id=None,
      framework=None,
      async_enable=False,
      target_filename=None,
      cb=None,
      iteration=None,
  ):
      """Update the given model for a given task ID"""
      if async_enable:
  
          def callback(uploaded_uri):
              if uploaded_uri is None:
                  return
  
              # If not successful, mark model as failed_uploading
              if uploaded_uri is False:
                  uploaded_uri = "{}/failed_uploading".format(
                      self._upload_storage_uri
                  )
  
              Model._local_model_to_id_uri[str(model_file)] = (
                  self.model_id,
                  uploaded_uri,
              )
  
              self.update(
                  uri=uploaded_uri,
                  task_id=task_id,
                  name=name,
                  comment=comment,
                  tags=tags,
                  design=design,
                  labels=labels,
                  project_id=project_id,
                  parent_id=parent_id,
                  framework=framework,
                  iteration=iteration,
              )
  
              if cb:
                  cb(model_file)
  
          uri = self._upload_model(
              model_file,
              async_enable=async_enable,
              target_filename=target_filename,
              cb=callback,
          )
          return uri
      else:
          uri = self._upload_model(
              model_file,
              async_enable=async_enable,
              target_filename=target_filename,
          )
          Model._local_model_to_id_uri[str(model_file)] = (
              self.model_id,
              uri,
          )
          self.update(
              uri=uri,
              task_id=task_id,
              name=name,
              comment=comment,
              tags=tags,
              design=design,
              labels=labels,
              project_id=project_id,
              parent_id=parent_id,
              framework=framework,
          )
  
          return uri
  
imports: from collections import namedtuple
  from functools import partial
  import six
  from pathlib2 import Path
  from .base import IdObjectBase
  from .util import make_message
  from ..backend_api import Session
  from ..backend_api.services import models, tasks
  from ..storage import StorageManager
  from ..storage.helper import StorageHelper
  from ..utilities.async_manager import AsyncManagerMixin
label_desc: Use image node_id 14 for calling the Model obj's underlying member method code with example usage: obj.update_and_upload(model_file, design, labels, name, comment, tags, task_id, project_id, parent_id, framework, async_enable, target_filename, cb, iteration) and returns: uri, uri