def METHOD_NAME(index, allow_exclusive_lock, files):
    # type: (Index, bool, list) -> None
    """
    Add or update metadata types in the index
    """
    if not files:
        print_help_msg(METHOD_NAME)
        sys.exit(1)
    exit_on_empty_file(list(read_documents(*files)))
    for descriptor_path, parsed_doc in read_documents(*files):
        try:
            type_ = index.metadata_types.from_doc(parsed_doc)
            index.metadata_types.add(type_, allow_table_lock=allow_exclusive_lock)
        except InvalidDocException as e:
            _LOG.exception(e)
            _LOG.error('Invalid metadata type definition: %s', descriptor_path)
            continue