<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_data_modality(self):
 """Detect the data modality based on the resource_types. resource_types == ['table'] => 'single_table' """

        resource_types = self.get_resource_types()
        first_type = resource_types[0]
        if first_type != 'table':
            return first_type

        elif len(resource_types) == 1:
            return 'single_table'

        else:
            second_type = resource_types[1]
            if second_type == 'table':
                return 'multi_table'

            return second_type