def load_source_file(path: FilePath, parse_file_type: ParseFileType, project_name: str) -> AnySourceFile:
    file_contents = load_file_contents(path.absolute_path, strip=False)
    checksum = FileHash.from_contents(file_contents)
    sf_cls = (SchemaSourceFile if (parse_file_type == ParseFileType.Schema) else SourceFile)
    source_file = sf_cls(path=path, checksum=checksum, parse_file_type=parse_file_type, project_name=project_name)
    source_file.contents = file_contents.strip()
    if (parse_file_type == ParseFileType.Schema):
        source_file.dfy = yaml_from_file(source_file)
    return source_file
def load_source_file(path: FilePath, parse_file_type: ParseFileType, project_name: str) -> AnySourceFile:
    file_contents = load_file_contents(path.absolute_path, strip=False)
    checksum = FileHash.from_contents(file_contents)
    sf_cls = (SchemaSourceFile if (parse_file_type == ParseFileType.Schema) else SourceFile)
    source_file = sf_cls(path=path, checksum=checksum, parse_file_type=parse_file_type, project_name=project_name)
    source_file.contents = file_contents.strip()
    if (parse_file_type == ParseFileType.Schema):
        source_file.dfy = yaml_from_file(source_file)
    return source_file