original_string: public function getList($country)
      {
          $list = Region::get()
              ->filter("CountryCode", strtoupper($country));
  
          if (!$list->exists() && $this->getCreateEmptyDefault()) {
              $countries = i18n::getData()->getCountries();
              if (isset($countries[strtolower($country)])) {
                  $name = $countries[strtolower($country)];
              } else {
                  $name = $country;
              }
              $list = ArrayList::create();
              $list->push(Region::create([
                  "Name" => $name,
                  "Type" => "Nation",
                  "Code" => strtoupper($country),
                  "CountryCode" => strtoupper($country)
              ]));
          }
  
          return $list;
      }
code: public function getList($country)
      {
          $list = Region::get()
              ->filter("CountryCode", strtoupper($country));
  
          if (!$list->exists() && $this->getCreateEmptyDefault()) {
              $countries = i18n::getData()->getCountries();
              if (isset($countries[strtolower($country)])) {
                  $name = $countries[strtolower($country)];
              } else {
                  $name = $country;
              }
              $list = ArrayList::create();
              $list->push(Region::create([
                  "Name" => $name,
                  "Type" => "Nation",
                  "Code" => strtoupper($country),
                  "CountryCode" => strtoupper($country)
              ]));
          }
  
          return $list;
      }
code_tokens: public function getList ( $ country ) { $ list = Region :: get ( ) -> filter ( "CountryCode" , strtoupper ( $ country ) ) ; if ( ! $ list -> exists ( ) && $ this -> getCreateEmptyDefault ( ) ) { $ countries = i18n :: getData ( ) -> getCountries ( ) ; if ( isset ( $ countries [ strtolower ( $ country ) ] ) ) { $ name = $ countries [ strtolower ( $ country ) ] ; } else { $ name = $ country ; } $ list = ArrayList :: create ( ) ; $ list -> push ( Region :: create ( [ "Name" => $ name , "Type" => "Nation" , "Code" => strtoupper ( $ country ) , "CountryCode" => strtoupper ( $ country ) ] ) ) ; } return $ list ; }
docstring: Get a list of regions, filtered by the provided country code
  
  @return SSList
docstring_tokens: Get a list of regions filtered by the provided country code