code: def named_relations(self, name, neg=False):
          '''Returns list of named Relations.
          
          <name> may be string or list.
          '''
          if self.internalLinks and not neg:
  
              if isinstance(name, six.string_types):
                  return filter(lambda x: x.name == name,
                                self.internalLinks)
  
              elif isinstance(name, list):
                  return filter(lambda x: x.name in name,
                                self.internalLinks)
              else:
                  return None #should rise error
  
          elif self.internalLinks and neg:
  
              if isinstance(name, six.string_types):
                  return filter(lambda x: x.name != name,
                                self.internalLinks)
  
              elif isinstance(name, list):
                  return filter(lambda x: x.name not in name,
                                self.internalLinks)
              else:
                  return None #should rise error
        
          else:
              return [f named_relations(self, name, neg=False):
          '''Returns list of named Relations.
          
          <name> may be string or list.
          '''
          if self.internalLinks and not neg:
  
              if isinstance(name, six.string_types):
                  return filter(lambda x: x.name == name,
                                self.internalLinks)
  
              elif isinstance(name, list):
                  return filter(lambda x: x.name in name,
                                self.internalLinks)
              else:
                  return None #should rise error
  
          elif self.internalLinks and neg:
  
              if isinstance(name, six.string_types):
                  return filter(lambda x: x.name != name,
                                self.internalLinks)
  
              elif isinstance(name, list):
                  return filter(lambda x: x.name not in name,
                                self.internalLinks)
              else:
                  return None #should rise error
        
          else:
              return []
docs: Returns list of named Relations.
          
          <name> may be string or list.