<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_removed(self):
 """Manage removed packages by extra options """

        removed, packages = [], []
        if "--tag" in self.extra:
            for pkg in find_package("", self.meta.pkg_path):
                for tag in self.binary:
                    if pkg.endswith(tag):
                        removed.append(split_package(pkg)[0])
                        packages.append(pkg)
            if not removed:
                self.msg.pkg_not_found("", "'tag'", "Can't remove", "\n")
                raise SystemExit(1)
        else:
            for pkg in self.binary:
                name = GetFromInstalled(pkg).name()
                ver = GetFromInstalled(pkg).version()
                package = find_package("{0}{1}{2}".format(
                    name, ver, self.meta.sp), self.meta.pkg_path)
                if pkg and name == pkg:
                    removed.append(pkg)
                    packages.append(package[0])
                else:
                    self.msg.pkg_not_found("", pkg, "Can't remove", "\n")
                    raise SystemExit(1)
        return removed, packages