<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def SafeLoadKextManager(self, fn_table):
 """Load the kextmanager, replacing unavailable symbols."""

    dll = None
    try:
      dll = SetCTypesForLibrary('IOKit', fn_table)
    except AttributeError as ae:
      if 'KextManagerUnloadKextWithIdentifier' in str(ae):
        # Try without this symbol, as it is not available on 10.6
        logging.debug('Using legacy kextunload')
        dll = self.SafeLoadKextManager(
            FilterFnTable(fn_table, 'KextManagerUnloadKextWithIdentifier'))
        dll.KextManagerUnloadKextWithIdentifier = self.LegacyKextunload
      elif 'KextManagerLoadKextWithURL' in str(ae):
        logging.debug('Using legacy kextload')
        dll = self.SafeLoadKextManager(
            FilterFnTable(fn_table, 'KextManagerLoadKextWithURL'))
        dll.KextManagerLoadKextWithURL = self.LegacyKextload
      else:
        raise OSError('Can\'t resolve KextManager symbols:{0}'.format(str(ae)))

    return dll