def METHOD_NAME():
    """
    Initializes SEs statuses taking their values from the CS.
    """
    from DIRAC import gConfig
    from DIRAC.DataManagementSystem.Utilities.DMSHelpers import DMSHelpers
    from DIRAC.ResourceStatusSystem.Client import ResourceStatusClient
    from DIRAC.ResourceStatusSystem.PolicySystem import StateMachine
    from DIRAC.ResourceStatusSystem.Utilities import CSHelpers, RssConfiguration
    # WarmUp local copy
    CSHelpers.warmUp()
    gLogger.info("Initializing SEs")
    rssClient = ResourceStatusClient.ResourceStatusClient()
    statuses = StateMachine.RSSMachine(None).getStates()
    statusTypes = RssConfiguration.RssConfiguration().getConfigStatusType("StorageElement")
    reason = "dirac-rss-sync"
    gLogger.debug(statuses)
    gLogger.debug(statusTypes)
    for se in DMSHelpers().getStorageElements():
        gLogger.debug(se)
        opts = gConfig.getOptionsDict(f"/Resources/StorageElements/{se}")
        if not opts["OK"]:
            gLogger.warn(opts["Message"])
            continue
        opts = opts["Value"]
        gLogger.debug(opts)
        # We copy the list into a new object to remove items INSIDE the loop !
        statusTypesList = statusTypes[:]
        for statusType, status in opts.items():
            # Sanity check...
            if statusType not in statusTypesList:
                continue
            # Transforms statuses to RSS terms
            if status in ("NotAllowed", "InActive"):
                status = "Banned"
            if status not in statuses:
                gLogger.error(f"{status} not a valid status for {se} - {statusType}")
                continue
            # We remove from the backtracking
            statusTypesList.remove(statusType)
            gLogger.debug([se, statusType, status, reason])
            result = rssClient.addOrModifyStatusElement(
                "Resource",
                "Status",
                name=se,
                statusType=statusType,
                status=status,
                elementType="StorageElement",
                tokenOwner="rs_svc",
                reason=reason,
            )
            if not result["OK"]:
                gLogger.error("Failed to modify")
                gLogger.error(result["Message"])
                continue
        # Backtracking: statusTypes not present on CS
        for statusType in statusTypesList:
            result = rssClient.addOrModifyStatusElement(
                "Resource",
                "Status",
                name=se,
                statusType=statusType,
                status=DEFAULT_STATUS,
                elementType="StorageElement",
                tokenOwner="rs_svc",
                reason=reason,
            )
            if not result["OK"]:
                gLogger.error(f"Error in backtracking for {se},{statusType},{status}")
                gLogger.error(result["Message"])
    return S_OK()