message: Change `hasattr` in `Graph.get_collection()` to use try/except.
  The current implementation of `hasattr` in Python 2.7 and 3.6 calls `getattr` under the hood. Since we subsequently make a second call to get the attribute, it is more efficient to "ask for forgiveness than permission" in this case.
diff: @@ -3969,8 +3969,12 @@ class Graph(object):
  c = []
  regex = re.compile(scope)
  for item in collection:
  - if hasattr(item, "name") and regex.match(item.name):
  + try:
  + if regex.match(item.name):
  c.append(item)
  + except AttributeError:
  + # Collection items with no name are ignored.
  + pass
  return c
  def get_all_collection_keys(self):
  