def externalize(taskclass_or_taskobject):
 compatible_copy = (copy.copy if six.PY3 else copy.deepcopy)
 copied_value = compatible_copy(taskclass_or_taskobject)
 if (copied_value is taskclass_or_taskobject):
  clazz = taskclass_or_taskobject
  @_task_wraps(clazz)
  class _CopyOfClass(clazz, ):
   _visible_in_registry = False
  _CopyOfClass.run = None
  return _CopyOfClass
 else:
  copied_value.run = None
  return copied_value

def externalize ( taskclass_or_taskobject ) : compatible_copy = ( copy . copy if six . PY3 else copy . deepcopy ) copied_value = compatible_copy ( taskclass_or_taskobject ) if ( copied_value is taskclass_or_taskobject ) : clazz = taskclass_or_taskobject @ _task_wraps ( clazz ) class _CopyOfClass ( clazz , ) : _visible_in_registry = False _CopyOfClass . run = None return _CopyOfClass else : copied_value . run = None return copied_value
returns an externalized version of a task .