def getinfos(spec):
 function = _GETINFOS_FUNCTIONS.get(spec.get('recontype'))
 if (type(function) is dict):
  function = function.get(spec.get('source'))
 if (function is None):
  return {}
 if hasattr(function, '__call__'):
  return function(spec)

def getinfos ( spec ) : function = _GETINFOS_FUNCTIONS . get ( spec . get ( 'recontype' ) ) if ( type ( function ) is dict ) : function = function . get ( spec . get ( 'source' ) ) if ( function is None ) : return { } if hasattr ( function , '__call__' ) : return function ( spec )
this functions takes a document from a passive sensor .