@staticmethod
    def filter_by_region(region, search_regions):
        if type(region) is int:
            return GrammarParser.filter_by_region([region, region], search_regions)
        regions = []
        for node in search_regions:
            if node["begin"] <= region[0] and node["end"] >= region[1]:
                regions.append(node)
        return regions

    # Find selector cover region
dataset/ETHPy150Open spywhere/Javatar/parser/GrammarParser.py/GrammarParser.filter_by_region/original