code: def restore_definition(self, project, definition_id, deleted):
          
          route_values = {}
          if project is not None:
              route_values['project'] = self._serialize.url('project', project, 'str')
          if definition_id is not None:
              route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int')
          query_parameters = {}
          if deleted is not None:
              query_parameters['deleted'] = self._serialize.query('deleted', deleted, 'bool')
          response = self._send(http_method='PATCH',
                                location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6',
                                version='5.0',
                                route_values=route_values,
                                query_parameters=query_parameters)
          return self._deserialize('BuildDefinition', response)
docs: RestoreDefinition.
          Restores a deleted definition
          :param str project: Project ID or project name
          :param int definition_id: The identifier of the definition to restore.
          :param bool deleted: When false, restores a deleted definition.
          :rtype: :class:`<BuildDefinition> <azure.devops.v5_0.build.models.BuildDefinition>`