#NEWLINE# def find_tag( fid , node , findkind ) : #NEWLINE# #INDENT# 'Find Tag in an open FIF file descriptor\n\n    Parameters\n    ----------\n    fid : file-like\n        Open file.\n    node : dict\n        Node to search.\n    findkind : int\n        Tag kind to find.\n\n    Returns\n    -------\n    tag : instance of Tag\n        The first tag found.\n    ' #NEWLINE# if ( node [ 'directory' ] is not None ) : #NEWLINE# #INDENT# for subnode in subnode [ 'directory' ] : #NEWLINE# #INDENT# if ( subnode . kind == findkind ) : #NEWLINE# #INDENT# return read_tag ( fid , subnode . pos ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return None