code: def clean_storage(block_device):
      '''
      Ensures a block device is clean.  That is:
          - unmounted
          - any lvm volume groups are deactivated
          - any lvm physical device signatures removed
          - partition table wiped
  
      :param block_device: str: Full path to block device to clean.
      '''
      for mp, d in mounts():
          if d == block_device:
              juju_log('clean_storage(): %s is mounted @ %s, unmounting.' %
                       (d, mp), level=INFO)
              umount(mp, persist=True)
  
      if is_lvm_physical_volume(block_device):
          deactivate_lvm_volume_group(block_device)
          remove_lvm_physical_volume(block_device)
      else:
          zap_disk(block_devicef clean_storage(block_device):
      '''
      Ensures a block device is clean.  That is:
          - unmounted
          - any lvm volume groups are deactivated
          - any lvm physical device signatures removed
          - partition table wiped
  
      :param block_device: str: Full path to block device to clean.
      '''
      for mp, d in mounts():
          if d == block_device:
              juju_log('clean_storage(): %s is mounted @ %s, unmounting.' %
                       (d, mp), level=INFO)
              umount(mp, persist=True)
  
      if is_lvm_physical_volume(block_device):
          deactivate_lvm_volume_group(block_device)
          remove_lvm_physical_volume(block_device)
      else:
          zap_disk(block_device)
docs: Ensures a block device is clean.  That is:
          - unmounted
          - any lvm volume groups are deactivated
          - any lvm physical device signatures removed
          - partition table wiped
  
      :param block_device: str: Full path to block device to clean.