<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ensure_product_string(cls, product):
 """Ensure that all product locations are strings. Older components specify paths as lists of path components. Join those paths into a normal path string. """


        if isinstance(product, str):
            return product

        if isinstance(product, list):
            return os.path.join(*product)

        raise DataError("Unknown object (not str or list) specified as a component product", product=product)