code: def dict_to_attributes_code(dict_):
      
      lines = []
      for key, value in dict_.iteritems():
          if isinstance(value, dict):
              txt = dict_to_attributes_code(value)
              lines_ = txt.split('\n')
              for line in lines_:
                  if not line.startswith(' '):
                      line = "%s.%s" % (key, line)
                  lines.append(line)
          else:
              value_txt = pformat(value)
              if '\n' in value_txt:
                  lines.append("%s = \\" % key)
                  value_txt = indent(value_txt)
                  lines.extend(value_txt.split('\n'))
              else:
                  line = "%s = %s" % (key, value_txt)
                  lines.append(line)
  
      return '\n'.join(lines)
docs: Given a nested dict, generate a python code equivalent.
  
      Example:
          >>> d = {'foo': 'bah', 'colors': {'red': 1, 'blue': 2}}
          >>> print dict_to_attributes_code(d)
          foo = 'bah'
          colors.red = 1
          colors.blue = 2
  
      Returns:
          str.