def CreateStatEntity(self,<EOL>kind,<EOL>kind_name=None,<EOL>property_type=None,<EOL>property_name=None,<EOL>subject_namespace=None,<EOL>composite_index_id=None,<EOL>has_entity_bytes=None,<EOL>has_builtin_index_stats=None,<EOL>has_composite_index_stats=None):
stat = datastore.Entity(kind)<EOL>stat['<STR_LIT>'] = <NUM_LIT:4><EOL>stat['<STR_LIT:count>'] = <NUM_LIT:2><EOL>stat['<STR_LIT>'] = datetime.datetime.utcfromtimestamp(<NUM_LIT>)<EOL>if has_entity_bytes:<EOL><INDENT>stat['<STR_LIT>'] = <NUM_LIT:2><EOL><DEDENT>if has_builtin_index_stats:<EOL><INDENT>stat['<STR_LIT>'] = <NUM_LIT:3><EOL>stat['<STR_LIT>'] = <NUM_LIT:1><EOL><DEDENT>if has_composite_index_stats:<EOL><INDENT>stat['<STR_LIT>'] = <NUM_LIT:2><EOL>stat['<STR_LIT>'] = <NUM_LIT:1><EOL><DEDENT>if kind_name is not None:<EOL><INDENT>stat['<STR_LIT>'] = kind_name<EOL><DEDENT>if property_type is not None:<EOL><INDENT>stat['<STR_LIT>'] = property_type<EOL><DEDENT>if property_name is not None:<EOL><INDENT>stat['<STR_LIT>'] = property_name<EOL><DEDENT>if subject_namespace is not None:<EOL><INDENT>stat['<STR_LIT>'] = subject_namespace<EOL><DEDENT>if composite_index_id is not None:<EOL><INDENT>stat['<STR_LIT>'] = composite_index_id<EOL><DEDENT>datastore.Put(stat)<EOL>
Create a single Statistic datastore entity.

        Args:
          kind: The name of the kind to store.
          kind_name: The value of the 'kind_name' property to set on the entity.
          property_type: The value of the 'property_type' property to set on the
            entity.
          property_name: The value of the 'property_name' property to set on the
            entity.
          subject_namespace: The namespace for NamespaceStat entities.
          composite_index_id: The index id of composite index.
          has_entity_bytes: The stat has the entity_bytes property.
          has_builtin_index_stats: The stat entity has builtin_index_bytes and
            builtin_index_count.
          has_composite_index_stats: The stat entity has composite_index_bytes and
            composite_index_count.