def get_filtered_bears(languages, log_printer, arg_parser=None):
 (sections, _) = load_configuration(arg_list=None, log_printer=log_printer, arg_parser=arg_parser)
 (local_bears, global_bears) = collect_all_bears_from_sections(sections, log_printer)
 if languages:
  local_bears = filter_section_bears_by_languages(local_bears, languages)
  global_bears = filter_section_bears_by_languages(global_bears, languages)
 return (local_bears, global_bears)

def get_filtered_bears ( languages , log_printer , arg_parser = None ) : ( sections , _ ) = load_configuration ( arg_list = None , log_printer = log_printer , arg_parser = arg_parser ) ( local_bears , global_bears ) = collect_all_bears_from_sections ( sections , log_printer ) if languages : local_bears = filter_section_bears_by_languages ( local_bears , languages ) global_bears = filter_section_bears_by_languages ( global_bears , languages ) return ( local_bears , global_bears )
fetch bears and filter them based on given list of languages .