<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _render_hs_label(self, hs):
 """Return the label of the given Hilbert space as a string"""

        if isinstance(hs.__class__, Singleton):
            return self._render_str(hs.label)
        else:
            return self._tensor_sym.join(
                [self._render_str(ls.label) for ls in hs.local_factors])