code: def make_lines(data, precision=None):
      
      lines = []
      static_tags = data.get('tags')
      for point in data['points']:
          elements = []
  
          # add measurement name
          measurement = _escape_tag(_get_unicode(
              point.get('measurement', data.get('measurement'))))
          key_values = [measurement]
  
          # add tags
          if static_tags:
              tags = dict(static_tags)  # make a copy, since we'll modify
              tags.update(point.get('tags') or {})
          else:
              tags = point.get('tags') or {}
  
          # tags should be sorted client-side to take load off server
          for tag_key, tag_value in sorted(iteritems(tags)):
              key = _escape_tag(tag_key)
              value = _escape_tag_value(tag_value)
  
              if key != '' and value != '':
                  key_values.append(key + "=" + value)
  
          elements.append(','.join(key_values))
  
          # add fields
          field_values = []
          for field_key, field_value in sorted(iteritems(point['fields'])):
              key = _escape_tag(field_key)
              value = _escape_value(field_value)
  
              if key != '' and value != '':
                  field_values.append(key + "=" + value)
  
          elements.append(','.join(field_values))
  
          # add timestamp
          if 'time' in point:
              timestamp = _get_unicode(str(int(
                  _convert_timestamp(point['time'], precision))))
              elements.append(timestamp)
  
          line = ' '.join(elements)
          lines.append(line)
  
      return '\n'.join(lines) + '\n'
docs: Extract points from given dict.
  
      Extracts the points from the given dict and returns a Unicode string
      matching the line protocol introduced in InfluxDB 0.9.0.