<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_package(self, check_name, package):
 """ Add a Package to the catalog for the given check """

        self._package_set.add(package)
        package_data = self._packages[package.name]
        self._checks_deps[check_name].append(package)

        # Versions
        if package.version:
            versions = package_data['versions']
            versions[package.version].append(check_name)

        # Marker section
        if package.marker:
            markers = package_data['markers']
            markers[package.marker].append(check_name)