docs: def default_bucket_link_factory(pid):
      """Factory for record bucket generation."""
      try:
          record = Record.get_record(pid.get_assigned_object())
          bucket = record.files.bucket
  
          return url_for('invenio_files_rest.bucket_api',
                         bucket_id=bucket.id, _external=True)
      except AttributeError:
          return None