code: def _get_value_from_element(self, elt, prop):
          args = None
          if isinstance(prop, tuple):
              prop, args = prop
          value = getattr(elt, prop, None)
          if value is None:
              return 'n/a'
          try:
              if isinstance(value, list):
                  return "[%s]" % ','.join(value)
              if not isinstance(value, collections.Callable):
                  return value
              if not args:
                  return value()
              real_args = []
              for arg in args:
                  real_args.append(getattr(self, arg, None))
              return value(*real_args)
          except AttributeError:
              return 'n/a'
          except UnicodeError:
              if isinstance(value, string_types):
                  return str(value, 'utf8', errors='ignore')
              return 'n/a'