<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_target_from_package_name(self, target, package_name, file_path):
 """Get a dependent target given the package name and relative file path. This will only traverse direct dependencies of the passed target. It is not necessary to traverse further than that because transitive dependencies will be resolved under the direct dependencies and every direct dependencies is symlinked to the target. Returns `None` if the target does not exist. :param NodePackage target: A subclass of NodePackage :param string package_name: A package.json name that is required to be the same as the target name :param string file_path: Relative filepath from target to the package in the format 'file:<address_path>' """

    address_path = self.parse_file_path(file_path)
    if not address_path:
      return None

    dep_spec_path = os.path.normpath(os.path.join(target.address.spec_path, address_path))
    for dep in target.dependencies:
      if dep.package_name == package_name and dep.address.spec_path == dep_spec_path:
        return dep
    return None