<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def ip_addrs(interface=None, include_loopback=False, cidr=None, type=None):
    '''
    Returns a list of IPv4 addresses assigned to the host.

    interface
        Only IP addresses from that interface will be returned.

    include_loopback : False
        Include loopback 127.0.0.1 IPv4 address.

    cidr
        Describes subnet using CIDR notation and only IPv4 addresses that belong
        to this subnet will be returned.

      .. versionchanged:: 2019.2.0

    type
        If option set to 'public' then only public addresses will be returned.
        Ditto for 'private'.

        .. versionchanged:: 2019.2.0

    CLI Example:

    .. code-block:: bash

        salt '*' network.ip_addrs
        salt '*' network.ip_addrs cidr=10.0.0.0/8
        salt '*' network.ip_addrs cidr=192.168.0.0/16 type=private
    '''
    addrs = salt.utils.network.ip_addrs(interface=interface,
                                        include_loopback=include_loopback)
    if cidr:
        return [i for i in addrs if salt.utils.network.in_subnet(cidr, [i])]
    else:
        if type == 'public':
            return [i for i in addrs if not is_private(i)]
        elif type == 'private':
            return [i for i in addrs if is_private(i)]
        else:
            return addrs