def input_field(self, name, value, sample_values):
    value = str(value)
    sample_values = [str(s) for s in sample_values]
    multiline = False
    if value:
      multiline = len(value) > 255 or value.find('\n') >= 0
    if not multiline:
      for sample_value in sample_values:
        if sample_value and (len(sample_value) > 255 or
                             sample_value.find('\n') >= 0):
          multiline = True
          break
    if multiline:
      if not value:
        value = ''
      return '<textarea name="%s" rows="5" cols="50">%s</textarea>' % (cgi.escape(name), cgi.escape(value))
    else:
      return DataType.input_field(self, name, value, sample_values)
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/admin/__init__.py/StringType.input_field/original