class_docstr: Multitask Model class which acts as wrapper for creating custom multitask models.
  
  Takes different tasks as input, parameter sharing is done by objects in flair,
  i.e. creating a Embedding Layer and passing it to two different Models, will
  result in a hard parameter-shared embedding layer. The abstract class takes care
  of calling the correct forward propagation and loss function of the respective
  model.
class_docstr_tok: ["Multitask","Model","class","which","acts","as","wrapper","for","creating","custom","multitask","models",".","Takes","different","tasks","as","input",",","parameter","sharing","is","done","by","objects","in","flair",",","i.e",".","creating","a","Embedding","Layer","and","passing","it","to","two","different","Models",",","will","result","in","a","hard","parameter-shared","embedding","layer",".","The","abstract","class","takes","care","of","calling","the","correct","forward","propagation","and","loss","function","of","the","respective","model","."]
code: def load(
      cls, model_path: Union[str, Path, Dict[str, Any]]
  ) -> "MultitaskModel":
      from typing import cast
  
      return cast("MultitaskModel", super().load(model_path=model_path))
  
imports: import logging
  import random
  import typing
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  import flair.nn
  from flair.data import DT, Corpus, Sentence
  from flair.file_utils import cached_path
  from flair.nn import Classifier
  from flair.training_utils import Result
label_desc: Use image node_id 13 for calling the MultitaskModel obj's underlying member method code with example usage: obj.load(cls, model_path) and returns: cast