def _process_names(self, names):
        """
        Convert a list of models/table names into a list of table names. Deals
        with cases of model inheritance, etc.
        """
        if names is None:
            return []

        table_names = OrderedDict()  # Preserve order and ignore duplicates
        while len(names):
            name = names.pop(0)
            if hasattr(name, '_meta'):
                if name._meta.abstract:
                    raise ValueError("Can't lock abstract model {}"
                                     .format(name.__name__))

                table_names[name._meta.db_table] = True
                # Include all parent models - the keys are the model classes
                if name._meta.parents:
                    names.extend(name._meta.parents.keys())
            else:
                table_names[name] = True
        return table_names.keys()
Convert a list of models/table names into a list of table names. Deals
        with cases of model inheritance, etc.