code: def get_lib_from(search_directory, lib_extension='.so'):
      '''Scan directories recursively until find any file with the given
      extension. The default extension to search is ``.so``.'''
      for root, dirs, files in walk(search_directory):
          for file in files:
              if file.endswith(lib_extension):
                  print('get_lib_from: {}\n\t- {}'.format(
                      search_directory, join(root, file)))
                  return join(root, file)
      return Nonf get_lib_from(search_directory, lib_extension='.so'):
      '''Scan directories recursively until find any file with the given
      extension. The default extension to search is ``.so``.'''
      for root, dirs, files in walk(search_directory):
          for file in files:
              if file.endswith(lib_extension):
                  print('get_lib_from: {}\n\t- {}'.format(
                      search_directory, join(root, file)))
                  return join(root, file)
      return None
docs: Scan directories recursively until find any file with the given
      extension. The default extension to search is ``.so``.