@classmethod<EOL><INDENT>def column_family_name(cls, include_keyspace=True):<DEDENT>
cf_name = '<STR_LIT>'<EOL>if cls.__table_name__:<EOL><INDENT>cf_name = cls.__table_name__.lower()<EOL><DEDENT>else:<EOL><INDENT>if cls._is_polymorphic and not cls._is_polymorphic_base:<EOL><INDENT>return cls._polymorphic_base.column_family_name(include_keyspace=include_keyspace)<EOL><DEDENT>camelcase = re.compile(r'<STR_LIT>')<EOL>ccase = lambda s: camelcase.sub(lambda v: '<STR_LIT>'.format(v.group(<NUM_LIT:1>), v.group(<NUM_LIT:2>).lower()), s)<EOL>cf_name += ccase(cls.__name__)<EOL>cf_name = cf_name[-<NUM_LIT>:]<EOL>cf_name = cf_name.lower()<EOL>cf_name = re.sub(r'<STR_LIT>', '<STR_LIT>', cf_name)<EOL><DEDENT>if not include_keyspace: return cf_name<EOL>return '<STR_LIT>'.format(cls._get_keyspace(), cf_name)<EOL>
Returns the column family name if it's been defined
otherwise, it creates it from the module and class name