def get_thing_types(tx):
    """
    Get all schema types, excluding those for implicit attribute relations and base types
    Args:
        tx: Grakn transaction

    Returns:
        Grakn types
    """
    schema_concepts = tx.query(
        "match $x sub thing; "
        "not {$x sub @has-attribute;}; "
        "not {$x sub @key-attribute;}; "
        "get;")
    thing_types = [schema_concept.get('x').label() for schema_concept in schema_concepts]
    [thing_types.remove(el) for el in ['thing', 'relation', 'entity', 'attribute']]
    return thing_types