    def obtain_lfs_extensions(self, tag: str) -> List[str]:
        """
        Download the .gitattributes file from the specified repo in order to figure out
        which files are being tracked by git-lfs.

        Lines that deal with git-lfs take on the following format:

        ```
            *.extension   filter=lfs  merge=lfs ...
        ```

        Args:
            tag (`str`):
                The tag name.

        Returns:
            (`List[str]`)
                The list of file extentions tracked by git-lfs.
        """
        res = self.hub_utils.get_file('.gitattributes', tag)
        lfs_files = []
        if res.status_code == 200:
            # Using temporary file in order to avoid double download, cleaner to not split up downloads everywhere.
            with TemporaryFile() as temp_file:
                temp_file.write(res.content)
                temp_file.seek(0)

                for line in temp_file:
                    parts = line.split()
                    # We only care if lfs filter is present.
                    if b'filter=lfs' in parts[1:]:
                        # Removing the `*` in `*.ext`, need work if filtering specific files.
                        lfs_files.append(parts[0].decode('utf-8')[1:])
        return lfs_files
Download the .gitattributes file from the specified repo in order to figure out
which files are being tracked by git-lfs.

Lines that deal with git-lfs take on the following format:

```
*.extension   filter=lfs  merge=lfs ...
```

Args:
tag (`str`):
The tag name.

Returns:
(`List[str]`)
The list of file extentions tracked by git-lfs.
towhee/hub/repo_manager.py