code: def detect(agent, fill_none=False):
      
      result = dict(platform=dict(name=None, version=None))
      _suggested_detectors = []
  
      for info_type in detectorshub:
          detectors = _suggested_detectors or detectorshub[info_type]
          for detector in detectors:
              try:
                  detector.detect(agent, result)
              except Exception as _err:
                  pass
  
      if fill_none:
          for outer_key in ('os', 'browser'):
              outer_value = result.setdefault(outer_key, dict())
              for inner_key in ('name', 'version'):
                  outer_value.setdefault(inner_key, None)
  
      return result
docs: fill_none: if name/version is not detected respective key is still added to the result with value None