def METHOD_NAME(mock_cooler):
    clr = api.Cooler(mock_cooler)
    assert clr.shape == (20, 20)
    # chrom table
    table = clr.chroms()[:]
    assert (
        table["name"].tolist()
        == mock_cooler["chroms"]["name"].astype('U').tolist()
    )
    assert np.all(table["length"] == mock_cooler["chroms"]["length"])
    # bin table
    table = clr.bins().fetch("chr1")
    assert np.all(table["start"] == mock_cooler["bins"]["start"][0:10])
    assert np.all(table["end"] == mock_cooler["bins"]["end"][0:10])
    # pixel table
    table = clr.pixels().fetch("chr1")
    # offsets
    assert clr.offset("chr1") == 0
    assert clr.extent("chr1") == (0, 10)
    # 2D range queries as rectangular or triangular
    A1 = np.triu(clr.matrix(balance=False).fetch("chr2"))
    df = clr.matrix(as_pixels=True, join=False, balance=False).fetch("chr2")
    i0 = clr.offset("chr2")
    i, j, v = df["bin1_id"], df["bin2_id"], df["count"]
    mat = sps.coo_matrix((v, (i - i0, j - i0)), (A1.shape))
    A2 = np.triu(mat.toarray())
    assert np.all(A1 == A2)