def check_compatibility(self, one_img, another_img=None):
if another_img is None:<EOL><INDENT>if len(self.items) > <NUM_LIT:0>:<EOL><INDENT>another_img = self.items[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>'.format(repr_imgs(one_img)))<EOL><DEDENT><DEDENT>try:<EOL><INDENT>if self.all_compatible:<EOL><INDENT>check_img_compatibility(one_img, another_img)<EOL><DEDENT>if self.mask is not None:<EOL><INDENT>check_img_compatibility(one_img, self.mask, only_check_3d=True)<EOL><DEDENT><DEDENT>except:<EOL><INDENT>raise<EOL><DEDENT>
Parameters
----------
one_img: str or img-like object.
    See NeuroImage constructor docstring.

anoter_img: str or img-like object.
    See NeuroImage constructor docstring.
    If None will use the first image of self.images, if there is any.

Raises
------
NiftiFilesNotCompatible
    If one_img and another_img aren't compatible.

ValueError
    If another_img is None and there are no other images in this set.