code: def find_first_declaration(
          declarations,
          decl_type=None,
          name=None,
          parent=None,
          recursive=True,
          fullname=None):
      
  
      decl_matcher = algorithm.match_declaration_t(
          decl_type=decl_type,
          name=name,
          fullname=fullname,
          parent=parent)
      if recursive:
          decls = make_flatten(declarations)
      else:
          decls = declarations
      for decl in decls:
          if decl_matcher(decl):
              return decl
      return None
docs: Returns first declaration that match criteria, defined by developer.
  
      For more information about arguments see :class:`match_declaration_t`
      class.
  
      :rtype: matched declaration :class:`declaration_t` or None