def collect_all_bears_from_sections(sections, log_printer):
 local_bears = {}
 global_bears = {}
 for section in sections:
  bear_dirs = sections[section].bear_dirs()
  (local_bears[section], global_bears[section]) = collect_bears(bear_dirs, ['**'], [BEAR_KIND.LOCAL, BEAR_KIND.GLOBAL], log_printer, warn_if_unused_glob=False)
 return (local_bears, global_bears)

def collect_all_bears_from_sections ( sections , log_printer ) : local_bears = { } global_bears = { } for section in sections : bear_dirs = sections [ section ] . bear_dirs ( ) ( local_bears [ section ] , global_bears [ section ] ) = collect_bears ( bear_dirs , [ '**' ] , [ BEAR_KIND . LOCAL , BEAR_KIND . GLOBAL ] , log_printer , warn_if_unused_glob = False ) return ( local_bears , global_bears )
collect all kinds of bears from bear directories given in the sections .