def METHOD_NAME(testcase, access):
  """Locate the issue of the testcase."""
  repo_id = testcase.github_repo_id
  issue_num = testcase.github_issue_num
  try:
    repo = access.get_repo(repo_id)
  except github.UnknownObjectException:
    logs.log_error(f'Unable to locate the GitHub repository id {repo_id}.')
    return None
  if not repo.has_issues:
    logs.log_warn('Unable to close issues of the main repo: '
                  'Repo has disabled issues.')
    return None
  try:
    target_issue = repo.get_issue(issue_num)
  except github.UnknownObjectException:
    logs.log_error(f'Unable to locate the GitHub issue number {issue_num}.')
    target_issue = None
  return target_issue