code: def toggle(path_or_id, badge_kind):
      '''Toggle a `badge_kind` for a given `path_or_id`
  
      The `path_or_id` is either an id, a slug or a file containing a list
      of ids or slugs.
      '''
      if exists(path_or_id):
          with open(path_or_id) as open_file:
              for id_or_slug in open_file.readlines():
                  toggle_badge(id_or_slug.strip(), badge_kind)
      else:
          toggle_badge(path_or_id, badge_kindf toggle(path_or_id, badge_kind):
      '''Toggle a `badge_kind` for a given `path_or_id`
  
      The `path_or_id` is either an id, a slug or a file containing a list
      of ids or slugs.
      '''
      if exists(path_or_id):
          with open(path_or_id) as open_file:
              for id_or_slug in open_file.readlines():
                  toggle_badge(id_or_slug.strip(), badge_kind)
      else:
          toggle_badge(path_or_id, badge_kind)
docs: Toggle a `badge_kind` for a given `path_or_id`
  
      The `path_or_id` is either an id, a slug or a file containing a list
      of ids or slugs.