def METHOD_NAME(self, *args, **options):
    # Get the modulestore
    store = modulestore()
    # Get the course data
    try:
        course_key = CourseKey.from_string(options['course_id'])
    except InvalidKeyError:
        raise CommandError("Invalid course_id")  # lint-amnesty, pylint: disable=raise-missing-from
    course = store.get_course(course_key)
    if course is None:
        raise CommandError("Invalid course_id")
    # Precompute inherited metadata at the course level, if needed:
    if options['inherited']:
        compute_inherited_metadata(course)
    # Convert course data to dictionary and dump it as JSON to stdout
    info = dump_block(course, inherited=options['inherited'], defaults=options['inherited_defaults'])
    return json.dumps(info, indent=2, sort_keys=True, default=str)