def should_show(name, pruning_params):
    """Whether to show the layer's distribution or not."""
    in_whitelist = not pruning_params.white_list or any(
        e in name for e in pruning_params.white_list)
    in_blacklist = any(e in name for e in pruning_params.black_list)
    if pruning_params.white_list and not in_whitelist:
      return False
    elif in_blacklist:
      return False
    return True