<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _inject_synthetic_dist_requirements(self, dist, req_lib_addr):
 """Inject a synthetic requirements library that references a local wheel. :param dist: Path of the locally built wheel to reference. :param req_lib_addr: :class: `Address` to give to the synthetic target. :return: a :class: `PythonRequirementLibrary` referencing the locally-built wheel. """

    whl_dir, base = split_basename_and_dirname(dist)
    whl_metadata = base.split('-')
    req_name = '=='.join([whl_metadata[0], whl_metadata[1]])
    req = PythonRequirement(req_name, repository=whl_dir)
    self.context.build_graph.inject_synthetic_target(req_lib_addr, PythonRequirementLibrary,
                                                     requirements=[req])