code: def valid_address(address):
      
      if not address:
          return False
  
      components = str(address).split(':')
      if len(components) > 2 or not valid_hostname(components[0]):
          return False
  
      if len(components) == 2 and not valid_port(components[1]):
          return False
  
      return True
docs: Determines whether the specified address string is valid.