def METHOD_NAME(name, gds_filename, units, lpp):
    """
    Open a GDS file and return the size from either the
    bounding box or a border layer.
    """
    k = (name, os.path.realpath(gds_filename), units, lpp)
    try:
        return _GDS_SIZE_CACHE[k]
    except KeyError:
        cell_vlsi = _get_gds_reader(units, gds_filename)
        measure_result = cell_vlsi.getLayoutBorder(lpp)
        if not measure_result:
            debug.info(2, "Layout border failed. Trying to measure size for {}".format(name))
            measure_result = cell_vlsi.measureSize(name)
        _GDS_SIZE_CACHE[k] = measure_result
        # returns width,height
        return measure_result