**Description**

function test_cycle will be collected by pytest if this function is imported in a user-defined test.
Such an error will be emitted as pytest will treat it as a test.
```
test setup failed
file /opt/conda/lib/python3.8/site-packages/airflow/utils/dag_cycle_tester.py, line 27
  def test_cycle(dag):
E       fixture 'dag' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

```

**Use case / motivation**
This can be simply "fixed" by renaming this function to check_cycle although the user can do it upon importing this function.
This change by airflow will reduce the amount of surprise received by the end-user, and save a large number of debugging hours. 

**Are you willing to submit a PR?**
The changeset is too small to worth the trouble for a PR. 
airflow/models/dagbag.py
"""Sync DAG specific permissions, if necessary"""
        from flask_appbuilder.security.sqla import models as sqla_models
        from airflow.security.permissions import DAG_ACTIONS, resource_name_for_dag
        def needs_perm_views(dag_id: str) -> bool:
            dag_resource_name = resource_name_for_dag(dag_id)
            for permission_name in DAG_ACTIONS:
                if not (
                    session.query(sqla_models.PermissionView)
                    .join(sqla_models.Permission)
                    .join(sqla_models.ViewMenu)
                    .filter(sqla_models.Permission.name == permission_name)
                    .filter(sqla_models.ViewMenu.name == dag_resource_name)
                    .one_or_none()
                ):
                    return True
            return False
        if dag.access_control or needs_perm_views(dag.dag_id):
            self.log.debug("Syncing DAG permissions: %s to the DB", dag.dag_id)
            from airflow.www.security import ApplessAirflowSecurityManager
            security_manager = ApplessAirflowSecurityManager(session=session)
            security_manager.sync_perm_for_dag(dag.dag_id, dag.access_control)