def METHOD_NAME(self, *args, **options):
    '''command logic'''
    # get filename from argument (type list)
    userfile = options['userfile'][0]
    # get filename from argument (type boolean)
    is_staff = options['is_staff']
    # get delimiter
    delimiter = options['delimiter']
    # get quotechar
    quotechar = options['quotechar']
    # define delimiter
    if delimiter:
        if delimiter == 'COMMA':
            delimiter = ','
        if delimiter == 'SEMICOLON':
            delimiter = ';'
        if delimiter == 'PIPE':
            delimiter = '|'
    else:
        delimiter = ','
    # get quotechar
    if quotechar:
        if quotechar == 'SINGLE':
            quotechar = "'"
        if quotechar == 'DOUBLE':
            quotechar = '"'
    else:
        quotechar = "'"
    # check file and get file handle
    usercsv = check_file(self, userfile, delimiter, quotechar)
    # if no file handle was returned
    if not usercsv:
        # return
        return
    # read rows out of csv
    rows = csv.reader(usercsv, delimiter=delimiter, quotechar=quotechar)
    # iterate over rows
    for row in rows:
        # get values from CSV
        username_from_row = row[0]
        password_from_row = row[1]
        # try to create user
        try:
            # atomic transaction needed for tests in combination with forced exception
            with transaction.atomic():
                User.objects.create_user(
                    username=username_from_row,
                    password=password_from_row,
                    is_staff=is_staff,
                )
            # write message to stdout
            if is_staff:
                self.stdout.write(
                    self.style.SUCCESS(
                        f'User "{username_from_row}" successfully created and added to staff.'
                    )
                )
            else:
                self.stdout.write(
                    self.style.SUCCESS(
                        f'User "{username_from_row}" successfully created.'
                    )
                )
        # user already exists
        except IntegrityError:
            # write message to stdout
            self.stdout.write(
                self.style.WARNING(
                    f'User "{username_from_row}" already exists (password not changed).'
                )
            )
        # username invalid
        except DataError:
            # write message to stdout
            self.stdout.write(
                self.style.ERROR(f'Username "{username_from_row}" is invalid.')
            )
    # close file
    usercsv.close()