Avoid using Python keyword 'type' as variable name.
Change variable name 'type' to 'data_type'
Change variable name 'types' to 'data_types'