private function _translateRoleInstances($instancesInfo)
    {
        $roleInstanceMap = [];

        $instances = Utilities::tryGetKeysChainValue(
            $instancesInfo,
            'Instances',
            'Instance'
        );

        if (!is_null($instances)) {
            if (array_key_exists('@attributes', $instances)) {
                $instances = [0 => $instances];
            }

            foreach ($instances as $instanceInfo) {
                $endpoints = $this->_translateRoleInstanceEndpoints(
                    $instanceInfo['Endpoints']['Endpoint']
                );

                $roleInstance = new RoleInstance(
                    $instanceInfo['@attributes']['id'],
                    $instanceInfo['@attributes']['faultDomain'],
                    $instanceInfo['@attributes']['updateDomain'],
                    $endpoints
                );

                $roleInstanceMap
                    [$instanceInfo['@attributes']['id']] = $roleInstance;
            }
        }

        return $roleInstanceMap;
    }