class_docstr: A row, from a query, from a database.
class_docstr_tok: ["A","row",",","from","a","query",",","from","a","database","."]
code: def __getitem__(self, key):
      # Support for index-based lookup.
      if isinstance(key, int):
          return self.values()[key]
  
      # Support for string-based lookup.
      if key in self.keys():
          i = self.keys().index(key)
          if self.keys().count(key) > 1:
              raise KeyError(
                  "Record contains multiple '{}' fields.".format(key)
              )
          return self.values()[i]
  
      raise KeyError("Record contains no '{}' field.".format(key))
  
imports: import os
  from sys import stdout
  from collections import OrderedDict
  from contextlib import contextmanager
  from inspect import isclass
  import tablib
  from docopt import docopt
  from sqlalchemy import create_engine, exc, inspect, text
label_desc: Use image node_id 5 for calling the Record obj's underlying member method code with example usage: obj.__getitem__(key) and returns: self, self