def __init__()

in ez_wsi_dicomweb/patch_embedding_ensemble_methods.py [0:0]


  def __init__(self, position: SinglePatchEnsemblePosition):
    """SinglePatchEnsemble Constructor.

    Args:
      position: Position of patch to generate embedding.

    Raises:
      ez_wsi_errors.SinglePatchEmbeddingEnsemblePositionError: Invalid
        SinglePatchEnsemblePosition.
    """
    super().__init__()
    self._position = position
    try:
      if position not in SinglePatchEnsemblePosition:
        raise ez_wsi_errors.SinglePatchEmbeddingEnsemblePositionError(
            'Invalid SinglePatchEnsemblePosition.'
        )
    except TypeError as e:
      raise ez_wsi_errors.SinglePatchEmbeddingEnsemblePositionError(
          'Invalid SinglePatchEnsemblePosition.'
      ) from e