def seq_for_table_attr(table, attribute, offset, seq_for, table_config):
    """Generate or update sequence numbers for each attribute that has a sequence

    >>> table_config = {'calls': {'attrs': {'id': {'seq': {'start': 300}}}}}
    >>> seq_for_table_attr('calls', 'id', 200, {}, table_config)
    (500, {'calls': {'id': 300}})
    >>> seq_for_table_attr('calls', 'id', 400, {'calls': {'id': 630}}, table_config)
    (1031, {'calls': {'id': 631}})
    """
    if seq_for == {}:
        for t in table_config:
            seq_for[t] = {}
    if seq_for[table].get(attribute):
        seq_for[table][attribute] = seq_for[table][attribute] + 1
    else:
        start = table_config[table]['attrs'][attribute]['seq']['start']
        seq_for[table][attribute] = start
    result_without_offset = seq_for[table][attribute]
    result_with_offset = result_without_offset + offset
    return result_with_offset, seq_for
