import re


def get_svg_file_d_attribute(path2file: str):
    """Returns d attribute content"""

    def find_d_attribute(text):
        return re.findall(r'<path d=\"(.*?)\"', text)

    with open(path2file, "r") as input_file:
        content = "".join(input_file.readlines())

        d_contents = find_d_attribute(content)

        if len(d_contents) != 1:
            raise ValueError("For now it should be one d attribute in svg.")
        return d_contents