code: def FetchURNsForAllSignedBinaries(token
                                   ):
    
    if _ShouldUseLegacyDatastore():
      urns = []
      aff4_roots = [GetAFF4PythonHackRoot(), GetAFF4ExecutablesRoot()]
      for _, descendant_urns in aff4.FACTORY.RecursiveMultiListChildren(
          aff4_roots):
        urns.extend(descendant_urns)
      aff4_streams = aff4.FACTORY.MultiOpen(
          urns, aff4_type=collects.GRRSignedBlob, mode="r", token=token)
      return [stream.urn for stream in aff4_streams]
    else:
      return [
          _SignedBinaryURNFromID(i)
          for i in data_store.REL_DB.ReadIDsForAllSignedBinaries()
      ]
docs: Returns URNs for all signed binaries in the datastore.
  
    Args:
      token: ACL token to use with the legacy (non-relational) datastore.