<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def binary(self):
 """Returns the binary that builds the pex for this lambda."""

    dependencies = self.dependencies
    if len(dependencies) != 1:
      raise TargetDefinitionException(self, 'An app must define exactly one binary '
                                            'dependency, have: {}'.format(dependencies))
    binary = dependencies[0]
    if not isinstance(binary, PythonBinary):
      raise TargetDefinitionException(self, 'Expected binary dependency to be a python_binary '
                                            'target, found {}'.format(binary))
    return binary