def is_netcdf_asset(asset, strict):
    """
    Determine if an asset is netcdf4-python compatible. netcdf4-python currently supports
    HDF5, NetCDF3, and NetCDF4. Determination is currently done through MIME if strict
    mode is enabled. If strict mode is not enabled, determination is done through 'data'
    role.

    Parameters
    ----------
    asset : pystac.Asset
        an asset to check

    Returns
    -------
    bool
        True if netcdf4-python compatible; False otherwise
    """

    if strict:
        accepted_types = ['application/x-hdf5', 'application/x-netcdf', 'application/x-netcdf4']
        return asset.media_type in accepted_types

    return 'data' in asset.roles