from typing import OrderedDict


def get_named_parameters(network):
    """Return named_parameters that consist of network

    Args:
        network (class): Network that consists of torch parameters or variables

    Returns:
       named parameters (generator): Set of parameters with names that consist of network
    """
    if isinstance(network, OrderedDict):
        return network.items()
    else:
        return network.named_parameters()