<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _to_http_hosts(hosts: Union[Iterable[str], str]) -> List[str]: """Convert a string of whitespace or comma separated hosts into a list of hosts. Hosts may also already be a list or other iterable. Each host will be prefixed with 'http://' if it is not already there. ['http://n1:4200', 'http://n2:4200'] ['http://n1:4200', 'http://n2:4200'] ['https://n1:4200'] ['http://n1:4200', 'http://n2:4200'] """

    if isinstance(hosts, str):
        hosts = hosts.replace(',', ' ').split()
    return [_to_http_uri(i) for i in hosts]