def METHOD_NAME(self, file_path: str, key: str, supported_entities: Iterable[str],
                 start_line: int = -1, end_line: int = -1, graph_resource: bool = False) -> str:
    """
    supported resources for GHA:
        jobs
        jobs.*.steps[]
        permissions
        on
    """
    if len(list(supported_entities)) > 1:
        logging.debug("order of entities might cause extracting the wrong key for resource_id")
    new_key = key
    definition = self.definitions.get(file_path, {})
    if not definition or not isinstance(definition, dict):
        return new_key
    if 'on' in supported_entities:
        workflow_name = definition.get('name', "")
        new_key = f"on({workflow_name})" if workflow_name else "on"
    elif 'jobs' in supported_entities or graph_resource and 'steps' in supported_entities:
        job_name = self.resolve_sub_name(definition, start_line, end_line, tag='jobs')
        new_key = f"jobs({job_name})" if job_name else "jobs"
        if (graph_resource and supported_entities == 'steps') or \
                (not graph_resource and 'jobs.*.steps[]' in supported_entities and key.split('.')[1] == '*'):
            step_name = self.resolve_step_name(definition['jobs'].get(job_name), start_line, end_line)
            new_key = f'jobs({job_name}).steps{step_name}'
    elif 'permissions' in supported_entities:
        new_key = 'permissions'
    return new_key