def format_gmeta(data, acl=None, identifier=None):
    if isinstance(data, dict):
        if acl is None or identifier is None:
            raise ValueError("acl and identifier are required when formatting a GMetaEntry.")
        if isinstance(acl, str):
            acl = [acl]
        prefixed_acl = []
        for uuid in acl:
            if uuid != "public" and not uuid.lower().startswith("urn:"):
                prefixed_acl.append("urn:globus:auth:identity:"+uuid.lower())
                prefixed_acl.append("urn:globus:groups:id:"+uuid.lower())
            else:
                prefixed_acl.append(uuid)
        return {
            "@datatype": "GMetaEntry",
            "@version": "2016-11-09",
            "subject": identifier,
            "visible_to": prefixed_acl,
            "content": data
            }
    elif isinstance(data, list):
        return {
            "@datatype": "GIngest",
            "@version": "2016-11-09",
            "ingest_type": "GMetaList",
            "ingest_data": {
                "@datatype": "GMetaList",
                "@version": "2016-11-09",
                "gmeta": data
                }
            }
    else:
        raise TypeError("Cannot format '" + str(type(data)) + "' into GMeta.")