def METHOD_NAME(self):
    if self.coursedir.course_id == '':
        self.fail("No course id specified. Re-run with --course flag.")
    if not self.authenticator.has_access(self.coursedir.student_id, self.coursedir.course_id):
        self.fail("You do not have access to this course.")
    self.inbound_path = os.path.join(self.root, self.coursedir.course_id, 'inbound')
    if not os.path.isdir(self.inbound_path):
        self.fail("Inbound directory doesn't exist: {}".format(self.inbound_path))
    if not check_mode(self.inbound_path, write=True, execute=True):
        self.fail("You don't have write permissions to the directory: {}".format(self.inbound_path))
    self.cache_path = os.path.join(self.cache, self.coursedir.course_id)
    if self.coursedir.student_id != '*':
        # An explicit student id has been specified on the command line; we use it as student_id
        if '*' in self.coursedir.student_id or '+' in self.coursedir.student_id:
            self.fail("The student ID should contain no '*' nor '+'; got {}".format(self.coursedir.student_id))
        student_id = self.coursedir.student_id
    else:
        student_id = get_username()
    if self.add_random_string:
        random_str = base64.urlsafe_b64encode(os.urandom(9)).decode('ascii')
        self.assignment_filename = '{}+{}+{}+{}'.format(
            student_id, self.coursedir.assignment_id, self.timestamp, random_str)
    else:
        self.assignment_filename = '{}+{}+{}'.format(
            student_id, self.coursedir.assignment_id, self.timestamp)