code: def is_scalar(obj):
      """A near-mirror of :func:`is_iterable`. Returns ``False`` if an
      object is an iterable container type. Strings are considered
      scalar as well, because strings are more often treated as whole
      values as opposed to iterables of 1-character substrings.
      >>> is_scalar(object())
      True
      >>> is_scalar(range(10))
      False
      >>> is_scalar('hello')
      True
      """
      return not is_iterable(obj) or isinstance(obj, basestring)
  
imports: import os
  import math
  import time
  import codecs
  import random
  import socket
  import hashlib
  import itertools
  from collections import Mapping, Sequence, Set, ItemsView
label_desc: Use image node_id 2 for calling a global function with example usage: is_scalar(obj) and returns: unknown