docs: def _metadata_unit(unit):
      """Given the name of a unit (e.g. apache2/0), get the unit charm's
      metadata.yaml. Very similar to metadata() but allows us to inspect
      other units. Unit needs to be co-located, such as a subordinate or
      principal/primary.
  
      :returns: metadata.yaml as a python object.
  
      """
      basedir = os.sep.join(charm_dir().split(os.sep)[:-2])
      unitdir = 'unit-{}'.format(unit.replace(os.sep, '-'))
      joineddir = os.path.join(basedir, unitdir, 'charm', 'metadata.yaml')
      if not os.path.exists(joineddir):
          return None
      with open(joineddir) as md:
          return yaml.safe_load(md)