<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def html_id(self):
 """ Return an id which can be used on an html page as an id attr of an html element. It is currently also persisted by some clients to identify blocks. To make compatible with old Location object functionality. I don't believe this behavior fits at this place, but I have no way to override. We should clearly define the purpose and restrictions of this (e.g., I'm assuming periods are fine). """

        if self.deprecated:
            id_fields = [self.DEPRECATED_TAG, self.org, self.course, self.block_type, self.block_id, self.version_guid]
            id_string = u"-".join([v for v in id_fields if v is not None])
            return self.clean_for_html(id_string)
        else:
            return self.block_id