Returns the kind name in CollectionDef. Args: item: A data item. Returns: The string representation of the kind in CollectionDef.
(item)
| 210 | |
| 211 | |
| 212 | def _get_kind_name(item): |
| 213 | """Returns the kind name in CollectionDef. |
| 214 | |
| 215 | Args: |
| 216 | item: A data item. |
| 217 | |
| 218 | Returns: |
| 219 | The string representation of the kind in CollectionDef. |
| 220 | """ |
| 221 | if isinstance(item, (six.string_types, six.binary_type)): |
| 222 | kind = "bytes_list" |
| 223 | elif isinstance(item, six.integer_types): |
| 224 | kind = "int64_list" |
| 225 | elif isinstance(item, float): |
| 226 | kind = "float_list" |
| 227 | elif isinstance(item, Any): |
| 228 | kind = "any_list" |
| 229 | else: |
| 230 | kind = "node_list" |
| 231 | return kind |
| 232 | |
| 233 | |
| 234 | SAVE_AND_RESTORE_OPS = ["SaveV2", |
no outgoing calls
no test coverage detected