code: def role_and_interface_to_relations(role, interface_name):
      
      _metadata = metadata()
      results = []
      for relation_name, relation in _metadata.get(role, {}).items():
          if relation['interface'] == interface_name:
              results.append(relation_name)
      return results
docs: Given a role and interface name, return a list of relation names for the
      current charm that use that interface under that role (where role is one
      of ``provides``, ``requires``, or ``peers``).
  
      :returns: A list of relation names.