@@ -0,0 +1,1670 @@
+# Copyright 2020 Google LLC.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#     http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0A%0Afrom typing import List, NamedTuple, Tuple%0A%0A%0Aclass PolyglotDriftData(NamedTuple):%0A    %22%22%22Struct for storing snippet metadata%0A    This object stores language-agnostic (%22polyglot%22)%0A    snippet data extracted from snippet source files%0A    for use by the second-stage %22polyglot%22 parser.%0A    %22%22%22%0A    source_path: str%0A    start_line: int%0A    end_line: int%0A    parser: str%0A    region_tags: List%5Bstr%5D = %5B%5D%0A    test_methods: List%5BTuple%5Bstr, str%5D%5D = %5B%5D%0A    children: List%5Bstr%5D = %5B%5D%0A%0A    @classmethod%0A    def from_json_dict(cls, json_dict):%0A        region_tags = json_dict.get('region_tags', %5B%5D)%0A        start_line = json_dict.get('start_line', None)%0A        end_line = json_dict.get('end_line', None)%0A        test_methods = json_dict.get('test_methods', %5B%5D)%0A        source_path = json_dict.get('source_path', %5B%5D)%0A        children = json_dict.get('children', %5B%5D)%0A        parser = json_dict.get('parser', None)%0A%0A        return cls(%0A            source_path,%0A            start_line,%0A            end_line,%0A            parser,%0A            region_tags,%0A            test_methods,%0A            children%0A        )%0A

update polyglot_drift_data object