def find_libs():
 from pyamf.util import get_module
 types = []
 mapping = {}
 for mod in ETREE_MODULES:
  try:
   etree = get_module(mod)
  except ImportError:
   continue
  t = _get_etree_type(etree)
  types.append(t)
  mapping[t] = etree
 return (tuple(types), mapping)

def find_libs ( ) : from pyamf . util import get_module types = [ ] mapping = { } for mod in ETREE_MODULES : try : etree = get_module ( mod ) except ImportError : continue t = _get_etree_type ( etree ) types . append ( t ) mapping [ t ] = etree return ( tuple ( types ) , mapping )
run through l{etree_modules} and find c{elementtree} implementations so that any type can be encoded .