<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _tool_classpath(self, tool, products, scheduler):
 """Return the proper classpath based on products and scala version."""

    classpath = self.tool_classpath_from_products(products,
                                                  self.versioned_tool_name(tool, self.version),
                                                  scope=self.options_scope)
    classpath = tuple(fast_relpath(c, get_buildroot()) for c in classpath)

    return self._memoized_scalac_classpath(classpath, scheduler)