#NEWLINE# def _find_image( img , ignore_registry = False ) : #NEWLINE# #INDENT# global mock_images #NEWLINE# for im in mock_images : #NEWLINE# #INDENT# im_name = im [ 'RepoTags' ] [ 0 ] #NEWLINE# if ( im_name == img ) : #NEWLINE# #INDENT# return im_name_wo_reg #NEWLINE# #UNINDENT# if ignore_registry : #NEWLINE# #INDENT# im_name_wo_reg = ImageName . parse ( im_name ) . to_str ( registry = False ) #NEWLINE# if ( im_name_wo_reg == img ) : #NEWLINE# #INDENT# return im #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return None