code: def from_dict(doc):
          
          return ModelOutputs(
              ModelOutputFile.from_dict(doc['prediction']),
              [ModelOutputFile.from_dict(a) for a in doc['attachments']]
          )
docs: Create a model output object from a dictionary.