<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_crawl_delay(self, user_agent):
 """Returns a float representing the crawl delay specified for this user agent, or None if the crawl delay was unspecified or not a float. """

        # See is_allowed() comment about the explicit unicode conversion.
        if (PY_MAJOR_VERSION < 3) and (not isinstance(user_agent, unicode)):
            user_agent = user_agent.decode()
    
        for ruleset in self.__rulesets:
            if ruleset.does_user_agent_match(user_agent):
                return ruleset.crawl_delay
                
        return None