def METHOD_NAME(nrows, ncols, outFileName):
    """
    Build a lattice shapefile with nrows rows and ncols cols.
    Parameters
    ----------
    nrows       : int
                  Number of rows
    ncols       : int
                  Number of cols
    outFileName : str
                  shapefile name with shp suffix
    Returns
    -------
    None
    """
    if not outFileName.endswith(".shp"):
        raise ValueError("outFileName must end with .shp")
    o = ps_open(outFileName, "w")
    dbf_name = outFileName.split(".")[0] + ".dbf"
    d = ps_open(dbf_name, "w")
    d.header = ["ID"]
    d.field_spec = [("N", 8, 0)]
    c = 0
    for i in range(ncols):
        for j in range(nrows):
            ll = i, j
            ul = i, j + 1
            ur = i + 1, j + 1
            lr = i + 1, j
            o.write(cg.Polygon([ll, ul, ur, lr, ll]))
            d.write([c])
            c += 1
    d.close()
    o.close()