def get_structural_entity_str(items, max_tok_len, sep_tok):
    """Return sep_tok joined list of items of strucutral resources.

    Args:
        items: list of structural resources
        max_tok_len: maximum token length
        sep_tok: token to separate out resources

    Returns:
        result string, number of items that went beyond ``max_tok_len``
    """
    i = 1
    over_len = 0
    while True:
        res = f" {sep_tok} " + f" {sep_tok} ".join(items[:i])
        if len(res.split()) > max_tok_len or i > len(items):
            if i < len(items):
                over_len = 1
            res = f" {sep_tok} " + f" {sep_tok} ".join(items[: max(1, i - 1)])
            break
        i += 1
    return res, over_len