<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _name_with_flags(self, include_restricted, title=None):
 """Generate the name with flags."""

        name = "Special: " if self.special else ""
        name += self.name
        if title:
            name += " - {}".format(title)
        if include_restricted and self.restricted:
            name += " (R)"
        name += " (BB)" if self.both_blocks else ""
        name += " (A)" if self.administrative else ""
        name += " (S)" if self.sticky else ""
        name += " (Deleted)" if self.deleted else ""
        return name