third_party/blink/renderer/build/scripts/make_runtime_features_utilities.py
def origin_trials(features):
    """
    This function returns all features that are in origin trial.
    The dependency is considered in origin trial if itself is in origin trial
    or any of its dependencies are in origin trial. Propagate dependency
    tag use DFS can find all features that are in origin trial.

    @param features: a List[Dict]. Each Dict must have keys 'name',
           'depends_on', 'implied_by' and 'origin_trial_feature_name'
           (see runtime_enabled_features.json5).
    @returns Set[str(runtime feature name)]
    """
    _validate_runtime_features_graph(features)

    origin_trials_set = set()

    graph = defaultdict(list)
    for feature in features:
        for dependency in feature['depends_on']:
            graph[dependency].append(str(feature['name']))

    def dfs(node):
        origin_trials_set.add(node)
        for dependent in graph[node]:
            if dependent not in origin_trials_set:
                dfs(dependent)

    for feature in features:
        if feature['origin_trial_feature_name']:
            dfs(str(feature['name']))

    return origin_trials_set

    This function returns all features that are in origin trial.
    The dependency is considered in origin trial if itself is in origin trial
    or any of its dependencies are in origin trial. Propagate dependency
    tag use DFS can find all features that are in origin trial.

    @param features: a List[Dict]. Each Dict must have keys 'name',
           'depends_on', 'implied_by' and 'origin_trial_feature_name'
           (see runtime_enabled_features.json5).
    @returns Set[str(runtime feature name)]
    
This function returns all features that are in origin trial.
The dependency is considered in origin trial if itself is in origin trial
or any of its dependencies are in origin trial. Propagate dependency
tag use DFS can find all features that are in origin trial.

@param features: a List[Dict].
This function returns all features that are in origin trial . The dependency is considered in origin trial if itself is in origin trial or any of its dependencies are in origin trial . Propagate dependency tag use DFS can find all features that are in origin trial . @param features : a List [ Dict ] .
def origin_trials(features):
    _validate_runtime_features_graph(features)
    origin_trials_set = set()
    graph = defaultdict(list)
    for feature in features:
        for dependency in feature['depends_on']:
            graph[dependency].append(str(feature['name']))
    def dfs(node):
        origin_trials_set.add(node)
        for dependent in graph[node]:
            if dependent not in origin_trials_set:
                dfs(dependent)
    for feature in features:
        if feature['origin_trial_feature_name']:
            dfs(str(feature['name']))
    return origin_trials_set
def origin_trials ( features ) : _validate_runtime_features_graph ( features ) origin_trials_set = set ( ) graph = defaultdict ( list ) for feature in features : for dependency in feature [ 'depends_on' ] : graph [ dependency ] . append ( str ( feature [ 'name' ] ) ) def dfs ( node ) : origin_trials_set . add ( node ) for dependent in graph [ node ] : if dependent not in origin_trials_set : dfs ( dependent ) for feature in features : if feature [ 'origin_trial_feature_name' ] : dfs ( str ( feature [ 'name' ] ) ) return origin_trials_set
This function returns all features that are in origin trial.
This function returns all features that are in origin trial .
"""
    This function returns all features that are in origin trial.
    The dependency is considered in origin trial if itself is in origin trial
    or any of its dependencies are in origin trial. Propagate dependency
    tag use DFS can find all features that are in origin trial.

    @param features: a List[Dict]. Each Dict must have keys 'name',
           'depends_on', 'implied_by' and 'origin_trial_feature_name'
           (see runtime_enabled_features.json5).
    @returns Set[str(runtime feature name)]
    """
features