def METHOD_NAME(self):
    """
    Make sure that the dataset roles work the way we expect them to.
    """
    infoA = FilesystemDatasetInfo(filePath=self.group1Data[0][0])
    infoC = FilesystemDatasetInfo(filePath=self.group1Data[1][0])
    op = OpDataSelectionGroup(graph=Graph())
    op.WorkingDirectory.setValue(self.workingDir)
    op.DatasetRoles.setValue(["RoleA", "RoleB", "RoleC"])
    op.DatasetGroup.resize(3)
    op.DatasetGroup[0].setValue(infoA)
    # Leave RoleB blank -- datasets other than the first are optional
    op.DatasetGroup[2].setValue(infoC)
    assert op.ImageGroup[0].ready()
    assert op.ImageGroup[2].ready()
    expectedDataA = self.group1Data[0][1]
    dataFromOpA = op.ImageGroup[0][:].wait()
    assert dataFromOpA.dtype == expectedDataA.dtype
    assert dataFromOpA.shape == expectedDataA.shape
    assert (dataFromOpA == expectedDataA).all()
    expectedDataC = self.group1Data[0][1]
    dataFromOpC = op.ImageGroup[0][:].wait()
    assert dataFromOpC.dtype == expectedDataC.dtype
    assert dataFromOpC.shape == expectedDataC.shape
    assert (dataFromOpC == expectedDataC).all()
    assert op.Image.ready()
    assert (op.Image[:].wait() == expectedDataA).all()
    # Ensure that files opened by the inner operators are closed before we exit.
    op.DatasetGroup.resize(0)