code: def is_mobile(user_agent):
      
      if user_agent:
          b = reg_b.search(user_agent)
          v = reg_v.search(user_agent[0:4])
          return b or v
      return False
docs: Checks if the user browser from the given user agent is mobile.
  
      Args:
          user_agent: A given user agent.
  
      Returns: True if the browser from the user agent is mobile.