<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def members_entries(self, all_are_optional: Optional[bool] = False) -> List[Tuple[str, str]]: """ Generate a list quoted raw name, signature type entries for this pairdef, recursively traversing reference types :param all_are_optional: If true, all types are forced optional :return: raw name/ signature type for all elements in this pair """

        if self._type_reference:
            rval: List[Tuple[str, str]] = []
            for n, t in self._context.reference(self._type_reference).members_entries(all_are_optional):
                rval.append((n, self._ebnf.signature_cardinality(t, all_are_optional).format(name=n)))
            return rval
        else:
            sig = self._ebnf.signature_cardinality(self._typ.reference_type(), all_are_optional)
            return [(name, sig.format(name=name)) for name in self._names]