<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_resource(self, filename, env_filename):
 """Add a resource to the PEX environment. :param filename: The source filename to add to the PEX; None to create an empty file at `env_filename`. :param env_filename: The destination filename in the PEX. This path must be a relative path. """

    self._ensure_unfrozen('Adding a resource')
    self._copy_or_link(filename, env_filename, "resource")