<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_platform(self):
 """Update platform attribute."""

        self.chain.connection.log("Detecting hw platform")
        platform = self.driver.get_hw_platform(self.udi)
        if platform:
            self.chain.connection.log("HW Platform: {}".format(platform))
            self.platform = platform